Re: [gtk2-perl] new Inline 0.44 release



Goran Thyni <goran kirra net> writes:

- it's slow when starting up, we need to use several different
  "use" to load up all the stuff, and I suppose having many
  different .so enlarges the memory footprint of the app; this is
  maybe solvable in Inline?

My idea is to make a hack to build a single .so-file
and to load that from Gtk2.pm. Since we have all
Inline dependencies in Gtk2/_config.pm it should
hopefully be doable without to much work.

Pseudo plan (surely does not work, but something like this):
1. Compile all with NOCLEAN (to keep the .o-files around)
  # rm -fr _Inline
  # perl fastcompile.pl NOCLEAN
2. link a shared objects
  # mkdir -p blib/arch/auto/Gtk2
  # gcc -shared -g -o blib/arch/auto/Gtk2/Gtk2.o `find _Inline/build/Gtk2 -name *.o`
  # touch blib/arch/auto/Gtk2/Gtk2.bs
3. copy all *.pm and kill _config.pm
  # mkdir -p blib/lib/Gtk2 
  # cp -r Gtk2.pm Gtk2 blib/lib
  # find blib/lib -name src | xargs rm -fr
  # > blib/lib/Gtk2/_config.pm

Since we'll have only one .so, what about using the same "use"
mechanism as with gtk-perl, e.g. only "use Gtk2" not use
explicitely all the stuff?

4. Add bootstrap to Gtk2.pm
  # echo 'bootstrap Gtk2 $VERSION' >> blib/lib/Gtk2/_config.pm
  
Then we should try to hack this process into a Makefile.PL and/or Makefile
If I get something like this to work I will check in a build script.

Seems nice! I'm looking forward to having that ready.


-- 
Guillaume Cottenceau - http://people.mandrakesoft.com/~gc/



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]