Comments (5)
From badlogicgames on June 17, 2010 16:53:33
i'd be surprised if that would have any impact on your perfomance. i'm aware of the slightly worse performance of generic collections compared to arrays but in all my tests this was never a problem. what device/android version are you testing this on?
please don't file something like this as a defect but rather as a request tor enhancement.
Status: Accepted
from libgdx.
From [email protected] on June 17, 2010 17:04:09
Well I can only go by the general percentages in DDMS and changing all my ArrayList's to list[] reduced their overall percentage.
My hardware is a Hero CDMA running android2.1
My use case is storing box2d bodies in an array that I iterate over after every step, in some cases where I have 15-30 bodies, this produces a faster result. The reason I allocate the bodies before world.step'ing is I was seeing better results simply deactivating bodies and transforming-and-reactivating bodies as needed versus creating and destroying bodies. I also make sure to only call various jni bits once like getWorldCenter only and store it in a seperate array for other things that need access to it.
I would love to actually file these requests correctly, and every time I click new issue, im looking for where I can set the type. Yet I never see it. Maybe I'm blind, but its just not there as an end user.
from libgdx.
From [email protected] on June 17, 2010 17:10:09
off subject and on the issue-type, I actually have a blank code project on google-code here, I went over to the issues, clicked "New Issue" and I have a plethora of options to set. Not sure of the specifics, but filing a new issue on libgdx does not present anything more then a title, description, and submit button.
from libgdx.
From [email protected] on June 17, 2010 17:30:04
On subject, to comment on overall speed improvement of methods making .get calls versus array[sub], each one changed contributed about a 2% improvement to overall performance, for a cumulative 5% performance increase at the current state of my project. So maybe it doesn't seem like a big deal, but all these bits add up and I'm not sure what the benefit of using an ArrayList is if one already knows the size of the array to be made thats in question. In the case of ArrayList usage, its needlessly slower (by any margin) and part of a function (Mesh.render) that is liable to get called alot depending on the application.
If there's a pragmatic benefit to ArrayList usage that libgdx is taking advantage of, then maybe its a moot point and a fair trade off
from libgdx.
From badlogicgames on June 18, 2010 05:07:03
Fixed in SVN to be released. thanks for the suggestion
Status: Fixed
Owner: badlogicgames
from libgdx.
Related Issues (20)
- Support for ISO Keyboards HOT 6
- Support for drawable in SelectBox HOT 4
- Use official metal sources HOT 1
- AndroidFragmentApplication dies onPause
- Performance issues on Android when enabling config.useGL30 HOT 7
- GWT requests unnecessary microphone permission HOT 5
- Stage.drawDebug does not work in combination with GL3 due to ShapeRenderer shader not being compliant HOT 2
- AndroidPreferences.flush() has no way to enforce synchronous saving HOT 2
- If an animation starts on frame 1 or more, rather than frame 0, AnimationController doesn't animate it properly
- glReadPixels does not support offset parameter crucial to read pixels asynchronously HOT 2
- gdx and gdx.jnigen.loader causes split module issue over package com.badlogic.gdx.utils HOT 6
- GWT preloader doesn't use percent-encoding HOT 2
- performance: unnecessary window.makeCurrent() in LWJGL3 backend HOT 4
- Add arm64 capabilities to Info.plist.xml HOT 1
- Suggestion to modify code in Sprite.rotate() method in com.badlogic.gdx.graphics.g2d.Sprite package HOT 4
- None of the 3D test apps in ..\tests\gdx-tests\src\com\badlogic\gdx\tests\g3d are build or runnable
- FPS Cap at runtime HOT 4
- GestureDetector / ActorGestureListener depend on absolute amount of touch points HOT 1
- LibGDX + KMP (Kotlin Multiplatform) HOT 1
- mistake
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from libgdx.