View Single Post
Old 12-17-2006, 03:47 PM   #7
Ammorth
I blink, therefore I am.
 
Ammorth's Avatar
 
Join Date: Sep 2006
Posts: 1,812

Submissions (10)

Ammorth is a glorious beacon of light (461)Ammorth is a glorious beacon of light (461)Ammorth is a glorious beacon of light (461)Ammorth is a glorious beacon of light (461)

Default

Okay, I have removed the recursive trigger, the unitgroup loop and increased the maximum node limit to 300.

The system is still in GUI though.

I am only having one slight problem. Changing the output to integer arrays. The problem lies here.

I could put all the nodes in a integer variable (like I'm doing with strings) but complex paths will most likely exceed the integer bit limit.

I could also put all the values in a 2d array, but if the path is too long, it could exceed the array limit. (300 nodes x 30 node-paths = 9000 values = exceeds array limit)

And ideas or can I just keep the string output?

Edit: After some brains-storming, I have came up with 2 ideas (if I'm not allowed to stick with strings)

1) Push the system back to 90 nodes maximum, and then the nodes would always fit the integer array (90 x 90 = 8100 < 8192)
2) Use a gamecache as my array, and store all the values in there, under the proper headings. (there would be a lot of entries for the gamecache, which could be worse than the leaking strings (memory-wise).

Ill do some tests and see which is worse.

Opinnions?

Edit 2: I ran a few tests about string leaks and gamecache memory usage.

Here is the data.

Click to see Data
Hidden information:

Code:
Set 1000 different Strings

Before        First      Second
85,856K       86,080K      86,064K
85,896K       86,104K      86,072K
85,160K       85,348K      85,400K

1000 Different GC Values (this uses different strings which may interfere with the data)

Before        First
85,908K       86,208K
85,728K       86,028K
85,156K       85,460K

1000 Different GC Values in same Category and Index (does not show memory used to store values)

Before        First
85,168K       85,252K
85,912K       85,996K
85,860K       85,936K

A loop that ran until thread limit (5882 loops) that set different string values

Before        First      Second
85,724K       87,728K      87,856K
85,160K       87,168K      87,224K
85,160K       87,160K      87,228K


As you can see, the increase in memory usage (from threads) is minute. As for a gamecache, it is less information, but the run-time is greater.
__________________
Ammorth is offline   Reply With Quote