[Bf-committers] Integration of scripts in the UI

Tomas Golembiovsky bf-committers@blender.org
Fri, 12 Sep 2003 21:36:23 +0200


Hi,

you are all talking about the speed of the GIMP and I see you are 
missing some details, so I thought that I can tell you more about it's 
plug-ins. Don't know if someone from you ever wrote any plug-in for GIMP 
(I did), if yes you can correct me if I'm telling lies :).

The main reason that GIMP starts so quickly is that it doesn't run the 
Init function all the scripts (in fact it's query() function but that's 
irelevant:). It has file that contains informations about all plug-ins 
that were found whan if last starts. When you run GIMP it first loads 
it's database, than it goes throug all files in plugins directory (they 
are *all* in on directory!). It compares the change time of the file 
with the time it has in his database and if it has changes (= the file 
has changed) it runs it's Init() function. If it hasn't change it 
continues and uses data it has in it's database. If it finds new file 
that isn't in his database if runs it's Init() function and stores the 
data with the "last change" time in it's database.

If you compare the time how long GIMP starts for the first time and time 
when it starts for the second time you will notice the difference. You 
can force to gimp to recreate it's database and of course load all 
scripts again if you delete the file ~/.gimp-1.2/pluginrc (it's located 
in your home directory - under windows NT/2k/XP it's in C:\Documents and 
Settings\<username>\.gimp-1.2 folder.

This should be all I thing (hope I din't forget anything). I thing this 
is good solution of the problem with scripts.

Yeah, and another thing. I agree that it's good to have top-level menu 
"Scripts" which will contain all scripts, but it shouldn't be organised 
according to directory structure (don't thing it's good solution). It 
will be better if scripts will tell (using the Init() function) where 
they want to be located.

-- 

Tomas Golembiovsky

------------------------
WEB: nyoxi.mysteria.cz
ICQ: 346980487
------------------------------------------------------------

Never underestimate the power of idiots in large groups.