Win a copy of Classic Computer Science Problems in Swift this week in the iOS forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Optimizing bytecode size  RSS feed

 
Ranch Hand
Posts: 782
Chrome Python Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My MIDLET size is currently 63992 bytes (this is with obsfucation).
I want to reduce the size furthermore.

(1) What kinds of programming tips & tricks would reduce bytecode size() ?
I am aware of:
  • Eliminate useless reevaluations inside loops
  • Eliminate common subexpressions


  • (2) Which obsfucators are the best (in size reduction)?

    Thanks

    Pho
     
    ranger
    Sheriff
    Posts: 17314
    11
    IntelliJ IDE Mac Spring
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    1. No Packages
    2. Reduce number of classes by combining some of them. Yes it is less OO, but reduces size.
    3. smaller images?

    Mark
     
    Ranch Hand
    Posts: 231
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Try JARG - http://jarg.sourceforge.net
    It uses a number of techniques to obfuscate and reduce JAR files.
     
    Greenhorn
    Posts: 3
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    You can also combine pictures into one file.
     
    Consider Paul's rocket mass heater.
    • Post Reply Bookmark Topic Watch Topic
    • New Topic
    Boost this thread!