Announcement

Collapse
No announcement yet.

Object Limits?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Object Limits?

    Are there any limits (other than available memory) to how much data an object can hold?

    Any limits to the number of variables (properties?) that can be attached to any one object?

    Or to all objects?

    ===

    Where in the Help system would stuff like this be revealed?

  • #2
    pflash50,

    Based on my experiences, no. When I put together an efs to measure PC performance speed I was creating an array that was 6 dimensions by 2 records each as fast as the machine could create them and then added each array (unshift) into another array(now 7 dimensions), up to a maximum number of 300,000 six dimensional arrays. I believe if I made the base 6 dimensional array have too many elements I made the machine run out of memory (imagine that ).

    As far as creating objects and adding variables to them, I have yet to run into any practical limit. In the code snippet below, I create multiple strategy objects, each one has hundreds of variables each (more than I show) and I have yet to have problems.

    PHP Code:
    for (x=0x<Strat_Names.lengthx++) {
      var 
    nObj = new Object;
      
      
    nObj.file_name 0;
      
    nObj.Cumulative_file_name 0;
      
    nObj.Strategy_name Strat_Names[x];
      
    nObj.stage 0;
      
    nObj.Long_Vote = new Array(("L-"+Strat_Names[x]),0,0,0,0,0,0,0,0,0,0); 
      
    nObj.Within_Trade_Hours false;
      
    nObj.ddate = ((new Date().getMonth()+1)+"-"+new Date().getDate()+"-"+new Date().getFullYear());
      
    nObj.ttime = (new Date().getHours()*100+new Date().getMinutes()+new Date().getSeconds()/100); 
      
    trade_strategy[x] = nObj;
      
    nObj null;


    BTW, I put in an alternate method to obtain the time and date, but this calls the date object a number of times and is not very efficient (I have not tested and compared).

    Comment

    Working...
    X