Your Universal Remote Control Center
RemoteCentral.com
Philips Pronto Professional Forum - View Post
Up level
Up level
The following page was printed from RemoteCentral.com:

Login:
Pass:
 
 

Original thread:
Post 1 made on Tuesday August 3, 2010 at 08:29
Guy Palmer
Active Member
Joined:
Posts:
June 2008
648
My Australian weather application has grown so large that the activity load time is becoming irritating. I am therefore trying to optimise it.

One of the characteristics of the app is the large amounts of historical data that are hard coded as variables but rarely accessed. I therefore want to place this data such that it is only loaded when it is actually used. There are a number of options for this, including:

1. Place the data in a page-level script, separate from the main page but in the same activity. This is what I do currently on the assumption that it is only loaded when that page is accessed, not when the activity is first accessed.

2. Place the data in a page-level script, separate from the main page and in a different activity. This would definitely mean that it is only loaded when that page/activity is accessed, but it would be a bit messy and so I only want to do it if my assumption above is incorrect.

3. Place the data in a number of panels and then access it as required using eval(). Again, this would be rather messy as the amount of data would mean that I would have to use multiple panels. Also, I don't understand when an eval() is actually evaluated (when the page is accessed, when the activity is accessed, or when the code is executed).

The overall issue here is that I don't understand what is loaded into memory when, particularly in terms of page scripts vs activity scripts vs eval().

Any thoughts?


Hosting Services by ipHouse