##// END OF EJS Templates
store: replace invocation of "getsize()" by "vfs.stat()"...
store: replace invocation of "getsize()" by "vfs.stat()" This patch replaces invocation of "getsize()", which calls "os.stat()" internally, by "vfs.stat()". The object referred by "self.rawvfs" is used internally by "_fncachevfs" and doesn't encode filename for each file API invocation. This patch invokes "os.stat()" via "self.rawvfs" to avoid redundant filename encoding: invocation of "os.stat()" via "self.vfs" hides filename encoding and encoding result from caller, so it is not appropriate, when both encoded and non-encoded filenames should be yield. Even though changeset b42b0729744d improved stream_out performance by "self.pathsep + path", this patch replaces it by "os.path.join(self.base, path)" of vfs. So, this may increase cost to join path components. But this shouldn't have large impact, because: - such cost is much less than cost of "os.stat()" which causes system call invocation - "datafiles()" of store object is invoked only for "hg manifest --all" or "hg verify" which are both heavy functions
FUJIWARA Katsunori -
r17727:6492b39a default
Show More
Name Size Modified Last Commit Author
/ hgext / inotify
linux
__init__.py Loading ...
client.py Loading ...
common.py Loading ...
linuxserver.py Loading ...
server.py Loading ...