deep

a Cross Development Platform for Java

User Tools

Site Tools


crosscompiler:donts

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Last revisionBoth sides next revision
crosscompiler:donts [2015/03/17 07:52] – created ursgrafcrosscompiler:donts [2015/04/03 16:10] ursgraf
Line 11: Line 11:
 Many methods in the standard library create strings. As a example: ''java/lang/Integer.toString'' or ''java/lang/Integer.toHexString'' create a new string object every time the are called. This first takes a considerable time and creates garbage. Do not use such methods if not absolutely necessary. For printing to serial output devices, it's much more efficient to use the methods in ''java/io/PrintStream''. They reuse existing strings. Many methods in the standard library create strings. As a example: ''java/lang/Integer.toString'' or ''java/lang/Integer.toHexString'' create a new string object every time the are called. This first takes a considerable time and creates garbage. Do not use such methods if not absolutely necessary. For printing to serial output devices, it's much more efficient to use the methods in ''java/io/PrintStream''. They reuse existing strings.
  
 +
 +===== Use interrupts carefully =====
 +Generally speaking, interrupts should not be used by an application. Use tasks to meet certain timing requirements. Interrupts can be and are in fact used by low-level drivers e.g. for serial communication.
  
crosscompiler/donts.txt · Last modified: 2016/02/25 13:33 by 127.0.0.1