------- Additional Comments From [hidden email] 2005-05-06 11:11 -------
VFS do not force to user to use "System.gc()".
This was just to debug this problem.
The times it took up VFS it uses a cache which never ever released a file - a
memory eater, so I implemented the SoftRefFilesCache.
I am still convinced that this sort of cache is good and could work, though I am
no longer sure VFS should use a cache in its core system.
One problem I constantly have with the cache (any sort of) is that it reports
stale data (due to filesytem changes form external processes) and I am forced to
constantly call ".close()" to refresh this info.
Currently I think about removing the cache, so every
will return a NEW FileObject (like new File("anyfile.txt") will create a new
instance), every call to fo.getContent().getSize() will lead to a call to the
used library (even if in case of FTP this will be a performance penalty)
That way we could have VFS as small as possible to abstract the different
libraries (something like commons-logging is for the different logging apis)
To reimplement the cache we could try to decorate the file-object with something
like a CachedFileObject which will do the caching with all its pros and cons.
The biggest con for this could be that it is no longer possible to synchronize
on a fileObject if resolved independent. But hey, who will do this?
And it will delay the move out of sandbox again as this is a huge change.