dragome/dragome-sdk

Heavy use of obsolete syncronized classes

Closed this issue · 5 comments

I see heavy use of StringBuffer, Vector and Hashtable in Dragome source base. Replacing them with StringBuilder, ArrayList and Hashmap will improve performance.

Can you specify where are these usages?

For example use of StringBuffer

~/Documents/dragome-sdk/dragome-bytecode-js-compiler/dx-src/com/android/dx/cf/direct/CodeObserver.java:157: StringBuffer sb = new StringBuffer(sz * 20 + 100);
~/Documents/dragome-sdk/dragome-bytecode-js-compiler/dx-src/com/android/dx/cf/direct/CodeObserver.java:157: StringBuffer sb = new StringBuffer(sz * 20 + 100);
~/Documents/dragome-sdk/dragome-bytecode-js-compiler/dx-src/com/android/dx/cf/iface/StdMember.java:71: StringBuffer sb = new StringBuffer(100);
~/Documents/dragome-sdk/dragome-bytecode-js-compiler/dx-src/com/android/dx/cf/iface/StdMember.java:71: StringBuffer sb = new StringBuffer(100);
~/Documents/dragome-sdk/dragome-bytecode-js-compiler/dx-src/com/android/dx/command/dump/BlockDumper.java:291: StringBuffer sb = new StringBuffer(2000);
~/Documents/dragome-sdk/dragome-bytecode-js-compiler/dx-src/com/android/dx/command/dump/BlockDumper.java:291: StringBuffer sb = new StringBuffer(2000);
~/Documents/dragome-sdk/dragome-bytecode-js-compiler/dx-src/com/android/dx/command/dump/SsaDumper.java:119: StringBuffer sb = new StringBuffer(2000);
....and many more

there are 207 places where StringBuffer is used.

there are 71 places where Vector is used, and 58 places where Hashtable is used.

this is code from Android Open Source Project, I think it should remains unchanged cause it's a library.

I didnt know that. I am closing this one down then.