It is very easy that · is optimized introduce Bug
Some optimize · the technology will make transplanting becomes difficult
· is possible you gave massive effort however effects is very small
· is optimized unifiedly compare difficulty commonly
I need to become a few explanations to last bits: Because optimize the target that is an adventitious and platform, some methods may move on Java platform a bit faster, and move a little possibly on J2ME platform a bit faster. Because carry out an environment to be put in the difference with vast move, your code may run very quickly on simulator, but very slow however on true machine. Conversely possible also. You are right of a kind of type optimize may cause the fall in the function on another kind of platform.
But these did not do not have a hope on behalf of us. You can undertake optimizing through two kinds of methods, advanced optimize and elementary optimize. Advanced optimize the function that can increase an order on aleatoric platform, the overall even quality that improves code. And elementary optimizing is opposite at some kind of specific type optimize a technology. Advanced optimize namely on algorithm optimize, elementary optimize namely program level is optimized to what single function carries out efficiency. Michael Abrash, one of developer of Quake, once wrote: "The Best Optimizer Is Between Your Ears" . (The best person that optimize is between your two ear) . The efficiency that uses admirable algorithm to be able to rise is used than be on the program of a common algorithm elementary optimize the efficiency that can improve to want to be gotten high much.
We go to the Profiler of use J2ME Wireless Toolkit analysing the moving efficiency of your code, it also will help your more accurate measurement give the effectiveness with these high-powered to carrying technologies.
Where to optimize?
In the movement kind in game, the program of 90% carries out time to was cost to be in the code of 10% paragraph in. This code of 10% paragraph it is the part that we need to be optimized centrally with all one's strength. We go to use Profiler finding the place of this 10% code. According to next graphs we open the Profiler function of J2ME Wireless Toolkit.
The ability after we must want to the program runs in simulator and be exited can play a Profiler window, pursue as follows:


Notice in left window this function place takes up Cpu per cent, this per cent is to always carry out time to spend the percentage on every specific function, next we should be found only it is OK to take up that function will optimize.
Previous 1 23 Next