Just curious exactly what is in the classes.dex file when an app is compiled.
I decided to clean up my code today and primarily I changed about 70 single Dim lines such as
Dim Button1 as Button
Dim Button2 as Button
to
Dim Button1, Button2 as Button
I also removed maybe 3 or 4 Dim XX as YY statements on variables that my project no longer uses. Other than that, I made no other changes other than add about 20 lines of code to add some new functionality to the app.
I figured that changing the way I did my Dim statements might reduce the code size a little, but was shocked to see that my APK was a little over 100kb smaller. Curious, I looked into the APK and compared it to an APK that I made before the changes and saw that the only thing that had changed was the classes.dex file, and that uncompressed, it was actually over 300kb smaller now!
What did it? Does dimming multiple variables in 'shorthand' save that much space in the classes.dex file, or was it simply from removing just a few unused variables? If that's the case, then does dimming a single variable add that much size to your app?
Mostly just wondering. I was so surprised in the size reduction that I initially feared that I accidentally deleted several blocks of code! As best as I can tell though, it's all still there.
I decided to clean up my code today and primarily I changed about 70 single Dim lines such as
Dim Button1 as Button
Dim Button2 as Button
to
Dim Button1, Button2 as Button
I also removed maybe 3 or 4 Dim XX as YY statements on variables that my project no longer uses. Other than that, I made no other changes other than add about 20 lines of code to add some new functionality to the app.
I figured that changing the way I did my Dim statements might reduce the code size a little, but was shocked to see that my APK was a little over 100kb smaller. Curious, I looked into the APK and compared it to an APK that I made before the changes and saw that the only thing that had changed was the classes.dex file, and that uncompressed, it was actually over 300kb smaller now!
What did it? Does dimming multiple variables in 'shorthand' save that much space in the classes.dex file, or was it simply from removing just a few unused variables? If that's the case, then does dimming a single variable add that much size to your app?
Mostly just wondering. I was so surprised in the size reduction that I initially feared that I accidentally deleted several blocks of code! As best as I can tell though, it's all still there.