optimization possible: cache listings of all parents of the current folder
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OBEX FTP Client for GNOME-VFS |
New
|
Undecided
|
Unassigned |
Bug Description
If the phone contains, for instance, the following filesystem tree
C:/
dirA/
dirB/
and if we are currently in dirB and we double-click 'DirC' to open it, Nautilus ( and most probably every other file manager ) will
call method 'do_get_file_info' on all parents of the directory being opened and on the directory itself, i.e. on
1) /
2) /C:
3) /C:/dirA/
4) /C:/dirA/dirB/
5) /C:/dirA/dirB/dirC/
It does so to figure out if we have permissions to open the 'dirC'.
Current caching mechanism caches the last listing only, thus this - common - scenario will result in 5 different obexftp transfers.
There appears to be no reason why gnome-vfs-obexftp couldn't cache all listings done during current connection, thus significantly
speeding up browsing.
Additionally, at the end of each 'session of calls' Nautilus will always call method 'do_get_
another obexftp listing of a directory, just to figure out the free space. This also could be cached.
I have a working version with full caching. Now I dont have time to prepare proper patches; I am attaching compressed 'src' directory instead.
Changes:
1) make debugging work in more similar fashion to how it works in osso-gwobex NAUTILUS_ WORKAROUND get_parent_ path_from_ uri() folder_ listing( ) from function om_get_ file_info_ helper( ) invalidate_ cache() from function om_chdir_to_uri()
2) define ENABLE_
3) remove trailing slash from om_utils_
4) remove unnecessary call to om_get_
5) remove unnecessary call to om_connection_
6) cache all folder listings done during current connection ( define MULTIPLE_CACHE in obex-method.c to enable it )