https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27267
--- Comment #15 from David Cook <[email protected]> --- (In reply to Julian Maurice from comment #13) > > 14. The top tool should show about 6.1MB usage. > > I get 6.9MB, and there is an additional 17.6MB used by the child process > every 5 seconds. So that's 24.5MB taken only to check if there is records to > index. Still better than 180MB, but worth noting IMO. > Talking about that, I wonder if it's really better to use a child process in > this case. Instead of just staying in memory, the code will be > loaded/unloaded every 5 seconds. Maybe it will use less memory 99% of the > time, but it will probably use more cpu time (and it will need all the > memory once every 5 second anyway, so that memory is not really "free") We could add an option. Personally, I rather not have the memory reserved by a process which is doing a little check. I much rather have it compete and allow more important processes to reserve memory. We could add an option to do the do the indexing check in the same process rather than using a child process, if you prefer. > I tried different things to measure memory consumption depending on what we > use: > - if I add 'require C4::Context' to _get_count (and nothing else), the child > process memory consumption goes up to 65MB > - if I add 'C4::Context->dbh()', memory consumption goes up to 98MB > > I don't know exactly where the problem is (though I suspect the DBIx::Class > schema to take a significant part of memory), but it would be useful for > such cases to have a method that returns a DBI object without loading half > of Koha. I 100% agree that it would be useful to have a method that returns a DBI object without loading half of Koha. > Also I agree with Joonas, the "$dbh creation" code should not be duplicated. In theory, yes. In practice, we're not at that point. I'm happy for this to stay as Failed QA, until someone else provides that minimal database connection object. -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
