Join Now
Quality Rating:
  • Currently 0.0 / 5
(0.0 / 5 - 0 votes cast)
Expertise Level:
  • Currently 0.0 / 5
(0.0 / 5 - 0 votes cast)

This page was last modified 07:09, 1 July 2008.

How to detect bottlenecks in the code to optimize it

From Forum Nokia Wiki

If you need to optimize a Java ME game or application and you don't know where to optimize, you should use a Profiler as the ones in SDKs and you should try to take times over your code.

If you want to know how many milliseconds an algorithm takes to finish the task in one device, you should use this code:

long start, finish, duration;
start = System.currentTimeMillis();
 
   // here goes all the code to check
 
finish = System.currentTimeMillis();
duration = finish - start;
 
Powered by MediaWiki
     
     RDF Facets:
     
     
     qfnZtopicQUqfnTopicZjavaQ
     qfnZtypeQUqfnTypeZCommunityContentQ
     qfnZtypeQUqfnTypeZWebpageQ
     qfnZtypeQUqfnTypeZWikiContentQ
     qmarsZlanguageQUxhttpE3aE2fE2fswE2enokiaE2ecomE2flanguageE2d1E2fenX