Effecient Coding for low end CPU
I have a application built in Silverlight, which will run on a ATOM processor (was told around 1.6GHZ).
So far tested another application with lesser functions on another Mini PC and it can still run smoothly. This application will be user interactive, and will have 4-5 different pages to be displayed. So to navigate from page to page, I currently have 2 options, but not sure which is a better way considering the low end CPU. (pages are static, nothing generated on the fly)1)Load the 4 - 5 pages during the onLoad event, shown the 1st page using Visibility.Visible.
The other pages will be Visibility.Collasped. This way, only need to toggle the Visibility property, pages need not be destroyed and re-created.2)Initialize all the开发者_Python百科 pages when loaded. Use Container.child to attach the wanted page. Not sure about the capability about this, but for other applications, I usually choose this method.
*P/S: I am okay if it takes a while to load,as the application will be loaded only once per day. As long as during the running period, it does not lag(using touchscreen) I am more than happy.
The main trick is to keep effects to a minimum. Animations etc. - not a problem in a normal application, more in a game or something. For normal LOB style apps, the CPU would not be too busy anyway.
精彩评论