Is there a lot of things done when we excecute
In my program, i need to use the file object at the beginning and at the
end of the use of it.
For the moment, i open the file, retrieve attributes and close the file
When the user needs to modify data, i open a new object file, save the
data and close the file.
Finally, i need to retrieve all the data so i open the file another time
and close it after.
That was to avoid memory waste.
Do you think it's better to open the file at the beginning and keep the
file object and reuse it for saving data and retrieve all data?
Thanks a lot for your suggestions,
Hi Philippe (and others),
[I'm coming back from vacancy, so I'll try to ask the questions that
have been posed in the pytables list]
A Thursday 04 August 2005 11:37, philopensource@... va escriure:
> Is there a lot of things done when we excecute
Well, this mainly depends on how many nodes has your file. Up to
version 1.1, PyTables was able to open nodes at a speed of 1000/second
roughly (on modern CPU's). If your files have much less nodes than,
say, 1000, then you can close and open your file without too much
latency. On the contrary, if you have a lot of nodes in your files,
then, it's better to not close/open your file, if you can afford this.
In forthcoming PyTables 1.2, the opening of files has been accelerated
quite a bit by not opening all the nodes on the file but just the ones
that are being used (in fact, a completely new object tree cache has
been implemented). The new cache also improves memory consumption. See
the next report if this process is critical for you:
>0,0< Francesc Altet =A0 =A0 http://www.carabos.com/
V V C=E1rabos Coop. V. =A0=A0Enjoy Data
Get latest updates about Open Source Projects, Conferences and News.