Keeping down the bytes...(advice from the pros?)

I've downloaded several widgets, objects, and what have you, and I noticed that the file size usually never exceeds kilobytes. My first upload, which I thought was a simple enough application, ended up being 3 megabytes!

So, I thought I'd ask the experts:


What are some tips to keeping the file size low?


I use PNGs for all my images.
I try to have as few objects as possible.
I try to use a minimal amount of scripts.

I figure my sloppy codes are probably what gets me into trouble. They tend to be convoluted at times.


Any suggestions are greatly appreciated. Let me have it.  
4,458 views 6 replies
Reply #1 Top
I'm investigating your widget. The first thing I see is the 7 bmp files included total over 1 MB, compressed. I'll be back later...
Reply #2 Top
I'm no DX wizard, but those same 7 bmp files, appear to be within the widget also, so they don't need to be in the zip file at all... now we're down to 2 MB widget.

If those bmp files were png files, they would be much smaller. Probably close to 10% of the bmp.
Reply #3 Top
I use PNGs for all my images.







The first thing I see is the 7 bmp files included total over 1 MB



....
Reply #4 Top
  , I should have made those wallpapers PNGs! Thanks for the tip, Koasati.

I did attach the wallpapers to the objects and I had a friend try it on his computer. The wallpapers did not load up. It's because the object that sets the wallpaper uses the full path to the files on the user's computer (the wallpapers were on mine), so obviously the paths were non-exsistent on his computer. I gave up and decided to include them in the zip.


Anyone else want to dole out the advice? Keep em coming.   I've got another widget in testing and I want to get the file size at a minimum before I upload.
Reply #5 Top
One tip I picked up came from Roman's Tutorials.

Using the tile/stretch features (states tab|appearance|advanced button)works wonders.
For example I had a widget that was 173k before using these features that became 7k.


On larger more complex widgets/objects the savings arent as significant but, still are wowing me.
Reply #6 Top
Good call, SirSmiley. I found DA's tutorials after completing my 1st object. But I certainly used the tile/stretch feature ALOT in my newest widget.

After reviewing my latest widget again, I found that images, in general, account for the majority of the file size. I made a custom about menu/tutorial for this widget. It had up to 12 images. After I reduced the amount of images I went from 1.26MB to 777KB! So from now on I'm going to keep the amount of images to a minimum.