[packagekit] app-install

Daniel Nicoletti dantti85-pk at yahoo.com.br
Mon Aug 30 11:47:57 PDT 2010


Hi Richard,

when are you planning to come back from your holidays? :P
I hope soon, today I started playing with app-install and after
finally making it work I concluded that the tools you wrote
need to be rewritten.

The time it took is completely unacceptable (not counting the
intensive IO):
real    34m58.611s
user    0m9.065s
sys     0m24.314s

I can see 3 problems:
 - Calling app-install-generate for each .desktop file is the main cause
   of the huge timing.
 - After fixing the above issue the insert queries must be prepared for faster
   execution
 - And the file should not be stored in a hash table, it should instead process
   line by line to avoid allocating memory which is expensive.

So after I while thinking about this problem I think I found a good solution,
instead of having several tools to manipulate the database we can have
a single C library (which can easily have bindings). This way we create a
C/C++ app that have the logic to where to fetch the data, and C functions
to insert into the database, this way the database can be left open for the
entire processing, the queries can be left prepared, and if the data does not
came from a desktop file it still can add it by using the functions
that the desktop parser would use.
As I don't know when will you get back and I really need this soon to try
getting it into kubuntu, I'll start codding now, if you have a better idea
please reply so we can make a good app-install v2 :D


Best,
Daniel.


      




More information about the PackageKit mailing list