|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,(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.