Thread: Calibre Speedup
View Single Post
Old 10-24-2012, 07:47 PM   #37
unboggling
by the bootstraps
unboggling ought to be getting tired of karma fortunes by now.unboggling ought to be getting tired of karma fortunes by now.unboggling ought to be getting tired of karma fortunes by now.unboggling ought to be getting tired of karma fortunes by now.unboggling ought to be getting tired of karma fortunes by now.unboggling ought to be getting tired of karma fortunes by now.unboggling ought to be getting tired of karma fortunes by now.unboggling ought to be getting tired of karma fortunes by now.unboggling ought to be getting tired of karma fortunes by now.unboggling ought to be getting tired of karma fortunes by now.unboggling ought to be getting tired of karma fortunes by now.
 
Posts: 1,051
Karma: 858115
Join Date: Jan 2011
Location: Southeast US
Device: PRS-T2, Nexus 7, KindleT, iPad1, Kindle3KB
Quote:
Originally Posted by kovidgoyal View Post
There are various environment variables your system can have that influence where the temp files end up. itimpi told you of the calibre specific one. There are lots more, http://docs.python.org/library/tempf...mpfile.tempdir

Presumably one of those is set on your system to something other than /tmp.
Thanks. I looked at that python tempdir info. On my system the OS X environment variable TMPDIR is set at startup, before opening calibre. That is what Python is using, but I'm not sure if that is set automatically by OS X or by Python as part of OS X startup.

TMPDIR=/var/folders/x3/2x81rgjj3lq_2r6wv3_xdkrm0000gn/T/

When I mount a RAMdisk on that directory that RAMdisk doesn't get created. When I reset TMPDIR to a different directory that directory doesn't get used. After installing calibre command line tools and setting CALIBRE_TEMP_DIR manually in the Terminal, CALIBRE_TEMP_DIR doesn't get used after starting the calibre GUI, not even when resetting CALIBRE_TEMP_DIR after calibre startup. What gets used in all cases so far is TMPDIR as listed above.

I assume the calibre environment variable CALIBRE_TEMP_DIR requires calibre command line tools first installed (on OS X). So far I haven't tried this with the calibre development environment which is not yet installed. Is setting CALIBRE_TEMP_DIR manually before or after launching the calibre GUI supposed to work? Or is that just with the calibre development environment?

Maybe I'm trying to set the ramdisk on /var/folders/x3/2x81rgjj3lq_2r6wv3_xdkrm0000gn/T too early in the OS X startup and it gets overwritten later by automatic user login initialization.

I'll work on this more tomorrow, including testing a timing delay.

The thought has crossed my mind that figuring this out would be simpler on Windows or Linux. Perhaps when I finally get a new computer it won't be a Mac.

Last edited by unboggling; 10-24-2012 at 09:13 PM. Reason: clarify
unboggling is offline   Reply With Quote