Processing.js run really slowly. How optimize, or do i use the good solution for my application?
in
Processing with Other Languages
•
5 months ago
I work on a processing datavisualisation project.
Locally when i run it (java) there are no problems and the application keep a good frame rate.
But when i run it on web (javascript) there is a lack of performance and my fps is divide by 2 or 3.
I cant post all my code, because there are a lot of class but i can say what massive operation i do.
- I must parse excel file (3000 cells and more)
- And use data to make barChart, curve and other data-representation
- For excel parsing and object stockage i use a lot of ArrayList<Type>
- I also use some hashMap to access certain object
- We use different image (one take all the sketch as a background), some with alpha, to make button or other interface
- I find how suspend draw when all animations are done but if there is a little changement somewhere i must redraw
all the scketch, so it's a little bit useless because it's when there are animation that we can see lag.
When i use "profiles" of google chrome and do a "heap snapshot", it seem's that (array) take 46% of shallow size.
Do i must use array instead of arrayList?
What operations are really expensive (in memory)?
Is there some golden rules to respect in order to keep a good fps?
Is processing.js the best solution for parsing excel file, drawing object with this excel-data, drawing 10-15 images and make an application-like sketch (with all input detection that we must do for it).
problem is that i cant use external library, so i must do gui, excel reader and container-system myself..
Someone can highlight me? I've a dead-line in 3weeks and we cant re-do all with an other technologie ( i think <canvas> is really better for mobile device)
Someone can highlight me? I've a dead-line in 3weeks and we cant re-do all with an other technologie ( i think <canvas> is really better for mobile device)
You can see the actual version
here
1