Does importing of lots of functions costs much?

Started by HPW, December 19, 2003, 01:53:23 AM

Previous topic - Next topic

HPW

When I import lots of functions does this costs much? (memory, cpu-load)



I have set up a loader-file for the pdf-lib with 304 functions.

Can I do this as default or must I pick only the current needed functions?

Or are the functions only some more symbols in the symbol-table?
Hans-Peter

HPW

#1
After some tests I found only a little difference between 1 and all import-calls. It seems when the DLL is once loaded it doesn't change much. Memory load of the tk-frontend is more changing without a clear reason. But it seems not related to (import ..).
Hans-Peter

Lutz

#2
The memory impact of an 'import' is minimal, just another symbol (32 bytes) and a cell to hold is (16 bytes). Calling overhead is very minimal too.



The memory load of the fronted is Tcl/Tk stuff and I don't know much about it. I know that the console window as it accumulates history consumes memory and gets slower. Click the 'clear-console' - button (the white paper sheet) once in a while or do a Ctrl-L.



Lutz