Categories: Java | Java ME | How To | Code Examples | Optimization
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;
| Related Discussions | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to detect if the phone is now supporting xhtml or wml? | yukeshean | Browsing and Mark-ups | 3 | 2004-05-18 20:12 |
| motion detection | froten | General Symbian C++ | 6 | 2008-03-03 22:18 |
| MIDP2.0 getKeyStates and KEY_PUND, KEY_STAR? How to detect? | xshake | Mobile Java General | 1 | 2004-09-02 08:39 |
| Can Nokia Midlet detect/notify when there is incoming phone call? | bcchong | Mobile Java General | 0 | 2002-09-17 06:41 |
| series 60 platform detection | d4 | Browsing and Mark-ups | 2 | 2003-07-01 09:50 |
