Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Adobe AIR Development

Reply
New Contributor
kpk1278
Posts: 9
Registered: ‎02-11-2009
My Device: Not Specified

Why Bar file is very big

[ Edited ]

I have just created very simple  blackberyy tablet application, "flex mobile project", but the bar file size is very big i.e. about 2.5 mb. And the same application through "ActionScript Mobile Project"  the size of bar file is only 350 kb.

 

Huge difference in file size. Is there any way to reduce the bar file size.

 

 

Thanks in advance.

Please use plain text.
Developer
zezke
Posts: 1,004
Registered: ‎12-12-2010
My Device: Z10 (red Limited Edition)
My Carrier: Mobile Vikings

Re: Why Bar file is very big

You can open the bar file using WinRar or comparable tool to check the contents. This way you can find the large files easily. If you are using Flash Builder check the bin-debug folder: all files in that folder will be included in the bar.
-------------------------------------------
BlackBerry Certified Builder for Native Application Development -- Proud member of the Belgian BlackBerry Developer group
Samples: Park in Ghent
Feeling generous? Nominate me for BB Elite member!
Please use plain text.
New Contributor
kpk1278
Posts: 9
Registered: ‎02-11-2009
My Device: Not Specified

Re: Why Bar file is very big

i have extracted that bar file, the file size of swf file is about 2.5 mb (project using flex mobile project), but in another one (using actionscript mobile project) its only 310 kb.

Why i am getting so much difference in file size.

Please use plain text.
Developer
JohnPinkerton
Posts: 350
Registered: ‎01-21-2011
My Device: Curve 8900 (Personal) / Bold 9650 (Work)
My Carrier: Regional

Re: Why Bar file is very big

[ Edited ]

Are you adding images or other media? Do you have extra files you no longer need in there?

 

I was messing around with different background images and forgot to remove several of the older ones (happens when life interrupts your night job of learning this stuff :smileywink:).

 

Edit: Also, check your imports!

Please use plain text.
Developer
billfoust
Posts: 382
Registered: ‎05-19-2008
My Device: BlackBerry Torch
My Carrier: AT&T

Re: Why Bar file is very big


JohnPinkerton wrote:

 

Edit: Also, check your imports!


I think this may be the root of the problem. If you are using * with your import statments, I can absolutely see how that would make the bar big.

 

Bill

Bill
-------------------------------------------
Check out my book on BlackBerry Development for Java.
And my other really really old book
My Apps: FlashKids
Please use plain text.
Developer
peter9477
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10
My Carrier: none

Re: Why Bar file is very big

 


billfoust wrote:
I think this may be the root of the problem. If you are using * with your import statments, I can absolutely see how that would make the bar big.

 

Is this really true?  I just threw in the following at the top of my main class file, and the .bar file size grew only 321 bytes.  And I absolutely do not use most of the things in those packages already in my app:

 

    import flash.utils.*;
    import flash.net.*;
    import flash.display.*;
    import flash.events.*;
    import flash.filesystem.*;
    import flash.text.*;

 

 


Peter Hansen -- (BB10 and dev-related blog posts at http://peterhansen.ca.)
Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!
Please use plain text.
Developer
JohnPinkerton
Posts: 350
Registered: ‎01-21-2011
My Device: Curve 8900 (Personal) / Bold 9650 (Work)
My Carrier: Regional

Re: Why Bar file is very big

Those might not be as big as others. I know when I was playing around with imports I knocked off half a meg by taking * off several of them and importing only what was necessary.

Please use plain text.
Developer
jffurlan
Posts: 1,003
Registered: ‎01-16-2011
My Device: PlayBook (sim)
My Carrier: Rogers

Re: Why Bar file is very big

I have been using .* to import simply because I don't always know exactly what to import - wondered if it would have any negative effects. Good to know that it's a way to keepfile size down
- If you like my response/post, or it helped you find an answer you were looking for, please provide a Kudo - white star to the bottom right of this post. -
- Please use the search bar at the top, or check out the PlayBook FAQ's for help getting started -
- Hockey DrillBook -
Please use plain text.
Developer
jtegen
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10
My Carrier: Verizon

Re: Why Bar file is very big

[ Edited ]

Easiest way is to comment out the imports that have '*' in them.  Re-compile and when you start getting errors, you can just go to where they are defined, let the IDE add the import when you start re-typing the class definition after ':'.  Makes for tighter code.

Please use plain text.
Developer
JohnPinkerton
Posts: 350
Registered: ‎01-21-2011
My Device: Curve 8900 (Personal) / Bold 9650 (Work)
My Carrier: Regional

Re: Why Bar file is very big

[ Edited ]

@jtegen - that's what I did to clean mine up.

 

I'm also assuming an import qnx.* will result in a much bigger file than import qnx.dialog.* -

Please use plain text.