Emerald Editor Discussion
June 26, 2017, 09:36:37 pm *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Triming wxWidgets  (Read 10295 times)
0 Members and 1 Guest are viewing this topic.
awmyhr
Senior Miner
***
Posts: 95

Maintainer of Obscure and Unused Ports


WWW
« on: July 12, 2006, 08:11:39 pm »

I believe that we have decided to statically link wxWidgets into EE.  I also believe a 'standard' build of wxWidgets as we've been doing (or at least, I have on Mac and Solaris) includes all kinds of stuff we are not/will not use.  For those who have experience with this sort of thing, may it be worth our while to carefully go through the configuration options for wxWidgets and determin what parts we need/don't need?  If I remember right, a dynamically linked executable on Solaris was very small (less then 500KB, maybe less then 100KB?  it's been awhile), but a static build was well over 5MB -- I think if we could save 50% or more of that, the effort may be worth it, what do others think?
Logged

-->>  This Space 4 Rent  <<--
Kamots
Miner
**
Posts: 22


Perpetual Student


« Reply #1 on: July 14, 2006, 05:43:25 pm »

I remember reading that was part of the work still left to be done on the project; going through wxWidgets and getting only what we need. EE has to be incredibly efficient and by default must be "lean and green" (Arantor Tongue) so it's definitely a task we should do. We should get a list of programming tasks to work on going and then maybe people might see a goal that they can get done. But getting back, this is definitely a good point awmyhr.
Logged
daemon
Developers
Gem Cutter
***
Posts: 107


WWW
« Reply #2 on: July 16, 2006, 05:25:55 am »

Yes this does have to be done. If somebody wants to go and fiddle around with the packages that'd be great. I'm not familiar with wxWidgets so if somebody would want to learn and take that on it would be awesome. There's a ton of images libraries that are built for wx and I'm not sure if we need all of them or not.
Logged
Arantor
Site Administrator
Administrator
Master Jeweller
*****
Posts: 618



« Reply #3 on: July 16, 2006, 09:04:56 am »

Well, I'm in the middle of reading the "Cross-platform Programming With wxWidgets" - the book they sell on the wxwidgets.org site.

It seems, although I could be wrong at this moment in time, that we can dispense with most (possibly except PNG) image libraries as a start. If we can reformat the images as XPM, we should be able to include these directly in the code, which would then dispense with PNG and zLib.

I also have the feeling we won't be needing to include the HTML viewing libraries, amongst other things. I did try a build removing all of these things, but wxSTC failed to build. Once I figure out what dependencies we will actually need, I'll try trimming the builds down.

Looking at the basic list of libraries/sublibraries: (http://www.wxwindows.org/manuals/2.6.3/wx_utilities.html#utilities)

The following should not be required at all:
Helpview, Tex2RTF, Emulator, Object Graphics Library, Animate Library, MMedia Library, Plot

The following may be required but it seems a little unlikely:
Helpgen (we're using Doxygen?), Configuration Tool, XRC Resource System, Frame Layout Library (toolbars?), Gizmos library (has all sorts of things, so maybe something in there?)

There is a good chance these will be required:
Net library (FTP support), Styled Text Control

After that, we can look at altering more drastic configure options for wxWidgets, like image support totally (XPM is C-compatible source code)
Logged

"Cleverly disguised as a responsible adult!"
awmyhr
Senior Miner
***
Posts: 95

Maintainer of Obscure and Unused Ports


WWW
« Reply #4 on: July 16, 2006, 04:58:21 pm »

I'll need to get my hands on that book.  Over the next couple weeks I'll be playing with cutting parts out as well, will post here on progress every now and then
« Last Edit: July 16, 2006, 05:39:58 pm by awmyhr » Logged

-->>  This Space 4 Rent  <<--
daemon
Developers
Gem Cutter
***
Posts: 107


WWW
« Reply #5 on: July 17, 2006, 08:03:54 am »

Just a personal design preference, but I think XPM icons are hideous and we should strive for a more modern-looking application.
Logged
awmyhr
Senior Miner
***
Posts: 95

Maintainer of Obscure and Unused Ports


WWW
« Reply #6 on: July 19, 2006, 01:26:33 am »

Well, it seems as thought my limited knowledge of building applications is a little too limited.  I've so far messed around with disabling the following in the wxWidgets build:

--without-libtiff --disable-wizarddlg --disable-xrc --disable-sound --disable-joystick --disable-htmlhelp

It should come as no surprise to experienced developers, but was a learning experience for me that, while this reduced the size of the static libraries to some degree, it did not effect the final executable in any way.  Thus I believe I'm barking up the wrong tree for size optimizations.  My Solaris builds (with static wxWidgets) still comes to 5.7M, will still be looking for ways to reduce this as I learn more and more...
Logged

-->>  This Space 4 Rent  <<--
Arantor
Site Administrator
Administrator
Master Jeweller
*****
Posts: 618



« Reply #7 on: July 21, 2006, 11:18:27 pm »

I tried something similar, and was finding a similar problem (although mine was a bit more extreme - I started with --disable- on everything and carried on adding stuff, by level of requirement, until I got it to build)

And I still ended up with a monster build. I guess it's to do with what the makefile does and what it links in? I haven't been able to verify that though.
Logged

"Cleverly disguised as a responsible adult!"
awmyhr
Senior Miner
***
Posts: 95

Maintainer of Obscure and Unused Ports


WWW
« Reply #8 on: July 26, 2006, 07:07:01 pm »

Well, I'm in the middle of reading the "Cross-platform Programming With wxWidgets" - the book they sell on the wxwidgets.org site.

All right, just got my copy, though I'm still knee-deep in "Thinking in C++."  I'll make a developer of myself yet...
Logged

-->>  This Space 4 Rent  <<--
Kamots
Miner
**
Posts: 22


Perpetual Student


« Reply #9 on: July 26, 2006, 08:22:10 pm »

You guys are using GCC right? Aren't there direct options to optimize code? Even some of the specific optimizations for Intel or AMD, etc. chips. Just a thought... right now at school we use the IBM VisualAge compiler for AIX servers and at home I'm using the Borland 5.5 Compiler (free download), both have options to optimize and they affect the executable in a big way depending on what the settings are. But then again, these compilers are circa 2000, whereas GCC is much newer so perhaps it's already configured to optimize the best it can.
Logged
daemon
Developers
Gem Cutter
***
Posts: 107


WWW
« Reply #10 on: July 27, 2006, 04:06:54 am »

Yeah, GCC has optimization settings. The -Os will make the fastest, smallest binary possible. There's a few other flags, but I don't remember them off the top of my head.
Logged
Arantor
Site Administrator
Administrator
Master Jeweller
*****
Posts: 618



« Reply #11 on: July 27, 2006, 12:18:54 pm »

I was reading an article on GCC 4.0 quite recently and the comments were made that GCC vs. Intel C Compiler is such that GCC can produce really tight builds if you're willing to sit down and figure out all of the weird configuration options.

It seems that GCC can build tightly but each option is only a minor tweak and many may need application, whilst ICC's options are more broad, more sweeping and thus each is more drastic to apply.

The only problem with ICC is that it's a little expensive at $399...
Logged

"Cleverly disguised as a responsible adult!"
daemon
Developers
Gem Cutter
***
Posts: 107


WWW
« Reply #12 on: July 28, 2006, 04:49:44 am »

Does ICC have an OSS-friendly discount Cheesy?
Logged
Arantor
Site Administrator
Administrator
Master Jeweller
*****
Posts: 618



« Reply #13 on: July 28, 2006, 08:34:33 pm »

Well, the only kind of OSS discount is a non-commercial license option but it appears to be for Linux only. If we later receive sponsorship of any kind it may preclude usage of ICC. That said, it is on a per-user basis, so anyone who uses ICC to build EE builds for our use but isn't being paid for it can use it on the NC license.

In theory what we could do is use a specific compiler for the optimised builds (e.g. VC on Windows, ICC on Linux etc.) but I'm loathe to do that for maintenance of the makefile(s).

It is definitely an option.
Logged

"Cleverly disguised as a responsible adult!"
awmyhr
Senior Miner
***
Posts: 95

Maintainer of Obscure and Unused Ports


WWW
« Reply #14 on: July 29, 2006, 01:30:44 am »

I wonder if the ICC on Linux would then support cross-compiling for optimized compiling of EE for other Intel based OS's...
Logged

-->>  This Space 4 Rent  <<--
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.242 seconds with 18 queries.