01-21-2011, 01:28 AM | #1 |
US Navy, Retired
Posts: 9,864
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
|
Run Away Memory or Expected Results?
While working in calibre, moving between two libraries there is an ever increasing memory footprint every time I switch between the libraries.
When I switch to my 5000 book epub library memory use increases 25M. When I switch to my 12500 book mixed format library memory use increases by 120M. At no point does calibre release any of the memory. Currently memory use is sitting at 1G and the only way to reduce this number is to restart calibre. I'm just curious if this is a known expected outcome of running multiple libraries. |
01-21-2011, 01:36 AM | #2 |
creator of calibre
Posts: 43,842
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
No, it's a memory leak. It's a rather hard to track down leak however, as references to the library are held in a *lot* of places, which is why I haven't bothered fixing it as yet.
|
Advert | |
|
01-21-2011, 01:48 AM | #3 | |
US Navy, Retired
Posts: 9,864
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
|
Quote:
The other day calibre died (a rare occurrence) on my work machine and I noted it was over 500M in size at the time. I had been testing two GUI plugins that Kiwidude is about to release so I started poking around to try and figure out where the increased memory came from. I was glad to see it wasn't from the plugins. Thanks again for all your work, don't waste your time on this leak it isn't a major problem, I was just curious. |
|
01-21-2011, 11:49 AM | #4 |
creator of calibre
Posts: 43,842
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
I found and fixed one leak. There may still be problems depending on what you are doing in calibre, for example running the content server. Now switching back and forth between libraries will not cause an increase in mem usage.
|
01-21-2011, 12:53 PM | #5 |
Addict
Posts: 378
Karma: 3102
Join Date: Dec 2010
Location: EU
Device: Kobo Aura ONE, Kobo Libra H20
|
Walt, how's performance like with a library with 12000+ books?
I ask this because, for performance reasons - and maybe I'm wrong - I've splitted my main library in two. One with about 1000 books and the other with about 800. I'd rather have everything in one library but I've been worried about performance. |
Advert | |
|
01-21-2011, 02:04 PM | #6 |
Wizard
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
|
|
01-21-2011, 04:44 PM | #7 |
US Navy, Retired
Posts: 9,864
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
|
|
01-21-2011, 05:31 PM | #8 | ||
US Navy, Retired
Posts: 9,864
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
|
FYI, I'm using Windows XP sp3 with calibre 0.7.41
Quote:
Like you said, Quote:
One leak down xxx leaks left to go. |
||
01-21-2011, 06:08 PM | #9 |
creator of calibre
Posts: 43,842
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Hmm can't replicate that. To confirm, all you did was start calibre and repeatedly switch libraries?
|
01-21-2011, 06:24 PM | #10 | |
US Navy, Retired
Posts: 9,864
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
|
Quote:
Spoiler:
Update:
Last edited by DoctorOhh; 01-21-2011 at 06:45 PM. |
|
01-21-2011, 08:11 PM | #11 |
creator of calibre
Posts: 43,842
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
And do you have the calibre content server running?
|
01-21-2011, 10:21 PM | #12 |
US Navy, Retired
Posts: 9,864
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
|
|
01-22-2011, 01:33 AM | #13 |
Addict
Posts: 378
Karma: 3102
Join Date: Dec 2010
Location: EU
Device: Kobo Aura ONE, Kobo Libra H20
|
Thanks, dwanthny and Starson17.
I think I'm gonna merge 2 of my libraries. |
01-22-2011, 08:46 AM | #14 |
Comparer of the Ephemeris
Posts: 1,496
Karma: 424697
Join Date: Mar 2009
Device: iPad
|
I'm seeing a memory leak as well, and I'm not running the content server. 0.7.42, OSX.
Initial load, library 1: 247MB Switch to library 2: 270MB Switch to library 1: 277.5MB Switch to library 2: 296.5MB Switch to library 1: 303.7MB ... G |
01-22-2011, 01:05 PM | #15 |
Addict
Posts: 378
Karma: 3102
Join Date: Dec 2010
Location: EU
Device: Kobo Aura ONE, Kobo Libra H20
|
dwanthny, even when you set the environment variable CALIBRE_TEMP_DIR, calibre will still create files and folders in your system's tmp enviroment variable.
Folders fontconfig and gen_py and several calxx.tmp files. Also, if you have "open in ePub Editor" in your context menu, a folder "Sigil" - if Sigil is your ePub editor - will be created in this folder. The only way right now to make caliber put all its temp files in a given directory is to use both the TEMP and TMP system variables. My calibre batch file starts like this: Code:
if not exist "d:\calibre" md "d:\calibre" || goto error SET TEMP=d:\calibre SET TMP=d:\calibre Last edited by paulfiera; 01-22-2011 at 01:16 PM. |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
No. of visitors expected | Manishsb | General Discussions | 5 | 08-05-2010 11:20 AM |
The Kindle Previewer expected soon | Sheikspeare | Amazon Kindle | 2 | 07-04-2010 12:34 PM |
Run Sony 505 software from memory stick? | Technophobe | Sony Reader | 3 | 12-07-2008 03:51 PM |