El dv 17 de 03 del 2006 a les 15:20 -0700, en/na Mike Romberg va
escriure:
> >>>>> " " == Francesc Altet <[EMAIL PROTECTED]> writes:
>
> [snip]
>
> > Mmm, right now, I think that PyTables can reclaim the space
> > freed in a file only if it is reclaimed in the same opening
> > session (this is ultimately an HDF5 limitation). So, perhaps
> > you can get a better behaviour if you remove the older run
> > *before* storing the new one.
>
> It looks like pytables won't reuse space because hdf5 won't reuse
> space.
Well, HDF5 do reuse space, but under special conditions (that I failed
to transmit you correctly). Look at the next example:
f = tables.openFile("prova.h5", "w")
for i in range(100):
f.createArray(f.root, "a%d"%i, range(1000))
f.removeNode('/a%d'%i)
f.close()
This creates 100 arrays of 1000 elements each, but after each creation,
the dataset is deleted. The final size of the file is:
-rw-r--r-- 1 faltet users 3024 2006-03-22 12:03 prova.h5
So, HDF5 seems to actually *reuse* the space.
However, if I close and re-open the file *before* removing the dataset:
f = tables.openFile("prova2.h5", "w")
for i in range(100):
f.createArray(f.root, "a%d"%i, range(1000))
f.close()
f = tables.openFile("prova2.h5", "a")
f.removeNode('/a%d'%i)
f.close()
then, you get a final file size of:
-rw-r--r-- 1 faltet users 404096 2006-03-22 12:02 prova2.h5
So, HDF5 (and hence, PyTables) seems to be able to reuse the space *if
and only if* the dataset is deleted and in the same open/close session
that it was created. I've heard that the HDF5 team would like to keep
track of the freed space even between different open/close sessions, but
I've no idea of when they will implement this.
> >> In a future release of HDF5 we will include support for managing
> >> the free space in a file.
>
> So, this would make having access to the H5Fmount() function from
> pytables even more desirable.
I don't see the immediate connection between reclaiming the freed space
and the mount thing. Can you develop more on this?
Regards,
--
>0,0< Francesc Altet http://www.carabos.com/
V V Cárabos Coop. V. Enjoy Data
"-"
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642
_______________________________________________
Pytables-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pytables-users