Gnucash nytprof file

Erik Colson eco at ecocode.net
Tue Oct 27 16:56:48 EDT 2015


Jed Diem <jed at tulane.edu> writes:

> I've attached the Gnucash nytprof file.
>
> In looking around both a gnucash.trace file and gnucash.dtruss file
> for patterns,  I found the following which may or may not be
> interesting.
>
> In a gnucash tracefile,  74532  instances of "Attempt to open or write
> to a disabled transaction log."
>
> In gnucash.dtruss,  4538 files not found errors.  16 either "LibIDN.pm
> or LibIDN.pmc instances", 1652 "dylib" instances and 2886 other files.

Hi,

So we are getting closer. I've attached a capture of the time spent in
loading perl module IO::Socket::SSL.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: Screen Shot 2015-10-27 at 21.02.00.png
Type: image/png
Size: 247471 bytes
Desc: not available
URL: <http://lists.gnucash.org/pipermail/gnucash-user/attachments/20151027/5de258f0/attachment-0001.png>
-------------- next part --------------

You'll see that your system spent 21s in line 253

    if ( eval { require Net::IDN::Encode }) {

and 42s in line 255

    } elsif ( eval { require Net::LibIDN }) {

As you've already detected with dtruss neither of those is installed on
your system. For some reason those 2 checks take ages.

The version of IO::Socket::SSL included on your system is ageing. Both
checks have been removed in current version of the module. I have a wild
guess that the problem you experience might be the reason for that. For
reference, this is the current version of the BEGIN block that contains
the problem:

BEGIN {
    # import some constants from Net::SSLeay or use hard-coded defaults
    # if Net::SSLeay isn't recent enough to provide the constants
    my %const = (
        NID_CommonName => 13,
        GEN_DNS => 2,
        GEN_IPADD => 7,
    );
    while ( my ($name,$value) = each %const ) {
        no strict 'refs';
        *{$name} = UNIVERSAL::can( 'Net::SSLeay', $name ) || sub { $value };
    }

    *idn_to_ascii = \&IO::Socket::SSL::PublicSuffix::idn_to_ascii;
    *idn_to_unicode = \&IO::Socket::SSL::PublicSuffix::idn_to_unicode;
}


In conclusion, I can figure two possibilities to solve your problem:

- install the first missing module

  cpan -i Net::IDN::Encode

  That way the first check should succeed and the second check won't be
  reached. If this solves the problem you don't need the second option.

- upgrade IO::Socket::SSL

  cpan -i IO::Socket::SLL

  but this might brake your system, as you are messing with the system
  perl modules. If you go this way, I recommend that you have a recent
  backup of your system, and be sure you can restore it!


Keep me informed !
-- 
erik colson


More information about the gnucash-user mailing list