
Really need help with slowdown in allocation operations.
I have noticed significant slowdowns in JScript in the execution of memory
allocation operations (object creation with properties of those objects
being assigned) when a few megabytes have been previously allocated by the
browser on account of JS memory allocation and aggregation operations.
Specifically:
We notice a linearly increasing execution speed penalty for operations that
allocate memory as the amount of memory that has been allocated and
aggregated increases. Especially, memory that has been allocated and
aggregated in previous function calls (whether methods or functions) slows
down further allocation operations. Finally, we notice a significant
penalty for allocating more complex (non-flat) data structures, apparently
linearly increasing as data structure reference depth increases.
*** --> Do you have any tips on how we should code in order to minimize the
above penalties? <-- ***
The slowdowns are indeed significant for our application.
It seems that, once memory is somewhat loaded up, allocating flatter
structures helps a lot. We wonder why this is, and thought that perhaps
someone on this newsgroup could be of assistance in this matter.
Thanks in advance!
- Chris Balz.