Long startup time
Brought to you by:
owenjm
On the first beta of Ubuntu 8.04 (Hardy Heron) starting checkgmail takes a long time (about 30 seconds), while on 7.10 it was virtually instantaneous.
When checking in htop the process (/usr/bin/perl -w /usr/bin/checkgmail) takes up a lot of CPU, up to 100%.
Starting with or without the profile parameter or with a new profile doesn't change anything.
My checkgmail version is svn revision 27.
My perl version is 5.8.8.
Logged In: NO
same problem here
Logged In: YES
user_id=969797
Originator: NO
Same problem for me too
Logged In: NO
Same problem.
Logged In: NO
Same problem here...
Looks like a translations thing. Removing all but the English translations before lang.xml removes the startup delay.
I'm not familiar with perl so I've just done some simple print-debugging. Every XMLin-operation takes ~5 seconds on my machine and the op. is called four times so we end up with ~20 seconds till the app is started (same goes for opening and closing preferences).
Shouldn't XMLin be much faster? There ARE a lot of translations but that's still not much data...
After some reading I changed the backend for XML::Simple to XML::Parser by adding
$ENV{XML_SIMPLE_PREFERRED_PARSER} = 'XML::Parser';
after line 44 to the first BEGIN-block. Now it starts as fast as it did before.
I'm sorry to spam this report (can't edit). Just wanted to add this link
http://search.cpan.org/~grantm/XML-Simple-2.18/lib/XML/Simple.pm#ENVIRONMENT
"XML::Simple will default to using a SAX parser if one is available or XML::Parser if SAX is not available. [...] Note: The XML::SAX distribution includes an XML parser written entirely in Perl. It is very portable but it is not very fast."
So I guess XML::Simple defaults to this slow perl parser if the backend isn't explicity set.
Ubuntu Intrepid, changelog of libxml-sax-perl, version 0.16+dfsg-1:
* Add support for SAX parser priorities.
+ lower the XML::SAX::PurePerl priority so that it will not be the
default parser anymore if any others are available. (Closes: #430118)
Ubuntu Hardy comes with libxml-sax-perl 0.16-0.1, case closed. :P