Skip Menu |

This queue is for tickets about the Config-IniFiles CPAN distribution.

Report information
The Basics
Id: 95899
Status: resolved
Priority: 0/
Queue: Config-IniFiles

People
Owner: Nobody in particular
Requestors: mca [...] sanger.ac.uk
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: 2.88



Subject: Config::IniFiles takes O(n^2) to add a section
Date: Fri, 23 May 2014 17:08:01 +0100
To: bug-Config-IniFiles [...] rt.cpan.org
From: Matthew Astley <mca [...] sanger.ac.uk>
Hi, We have some rather large .ini files which take many seconds to load or query. I have partly fixed this, but I'm afraid it's not just a merge & release. I made a test case to demonstrate, hopefully in a CPU speed independent way, that adding sections to $ini gets progressively slower. This is available based on 2.58 and 2.83, https://bitbucket.org/mcast/perl-config-inifiles/commits/all (my inexperience with Mercurial may be showing here) As we are using 2.58 in our application, I made a quick but ugly fix there to short-circuit most of the linear searches. Tests pass, speed is improved, but I'm not convinced it is a good approach. I'm sorry this fix doesn't merge to 2.83, and I have not attempted to rework the data structures to make a cleaner fix for the problem. Perhaps you can use the test anyway? Thanks for supporting C:IF, -- Matthew -- The Wellcome Trust Sanger Institute is operated by Genome Research Limited, a charity registered in England with number 1021457 and a company registered in England with number 2742969, whose registered office is 215 Euston Road, London, NW1 2BE.
This was fixed in 2.88, with a contribution from James Rouzier. See https://github.com/shlomif/perl-Config-IniFiles/commit/3636592 This ticket can be closed. On Fri May 23 12:08:11 2014, mca@sanger.ac.uk wrote: Show quoted text
> Hi, > > We have some rather large .ini files which take many seconds to load > or query. I have partly fixed this, but I'm afraid it's not just a > merge & release. > > > I made a test case to demonstrate, hopefully in a CPU speed > independent way, that adding sections to $ini gets progressively > slower. This is available based on 2.58 and 2.83, > > https://bitbucket.org/mcast/perl-config-inifiles/commits/all > (my inexperience with Mercurial may be showing here) > > As we are using 2.58 in our application, I made a quick but ugly fix > there to short-circuit most of the linear searches. Tests pass, speed > is improved, but I'm not convinced it is a good approach. > > I'm sorry this fix doesn't merge to 2.83, and I have not attempted to > rework the data structures to make a cleaner fix for the problem. > Perhaps you can use the test anyway? > > > Thanks for supporting C:IF,
On Sat Mar 10 09:45:45 2018, JJATRIA wrote: Show quoted text
> This was fixed in 2.88, with a contribution from James Rouzier. > > See https://github.com/shlomif/perl-Config-IniFiles/commit/3636592 > > This ticket can be closed. >
thanks! closing. Show quoted text
> On Fri May 23 12:08:11 2014, mca@sanger.ac.uk wrote:
> > Hi, > > > > We have some rather large .ini files which take many seconds to load > > or query. I have partly fixed this, but I'm afraid it's not just a > > merge & release. > > > > > > I made a test case to demonstrate, hopefully in a CPU speed > > independent way, that adding sections to $ini gets progressively > > slower. This is available based on 2.58 and 2.83, > > > > https://bitbucket.org/mcast/perl-config-inifiles/commits/all > > (my inexperience with Mercurial may be showing here) > > > > As we are using 2.58 in our application, I made a quick but ugly fix > > there to short-circuit most of the linear searches. Tests pass, speed > > is improved, but I'm not convinced it is a good approach. > > > > I'm sorry this fix doesn't merge to 2.83, and I have not attempted to > > rework the data structures to make a cleaner fix for the problem. > > Perhaps you can use the test anyway? > > > > > > Thanks for supporting C:IF,
> >