##// END OF EJS Templates
dirstate: use the 'nogc' decorator...
Pierre-Yves David -
r23496:ee5a4ed4 default
parent child Browse files
Show More
@@ -8,7 +8,7 b''
8 from node import nullid
8 from node import nullid
9 from i18n import _
9 from i18n import _
10 import scmutil, util, ignore, osutil, parsers, encoding, pathutil
10 import scmutil, util, ignore, osutil, parsers, encoding, pathutil
11 import os, stat, errno, gc
11 import os, stat, errno
12
12
13 propertycache = util.propertycache
13 propertycache = util.propertycache
14 filecache = scmutil.filecache
14 filecache = scmutil.filecache
@@ -317,13 +317,10 b' class dirstate(object):'
317 # Depending on when in the process's lifetime the dirstate is parsed,
317 # Depending on when in the process's lifetime the dirstate is parsed,
318 # this can get very expensive. As a workaround, disable GC while
318 # this can get very expensive. As a workaround, disable GC while
319 # parsing the dirstate.
319 # parsing the dirstate.
320 gcenabled = gc.isenabled()
320 #
321 gc.disable()
321 # (we cannot decorate the function directly since it is in a C module)
322 try:
322 parse_dirstate = util.nogc(parsers.parse_dirstate)
323 p = parsers.parse_dirstate(self._map, self._copymap, st)
323 p = parse_dirstate(self._map, self._copymap, st)
324 finally:
325 if gcenabled:
326 gc.enable()
327 if not self._dirtypl:
324 if not self._dirtypl:
328 self._pl = p
325 self._pl = p
329
326
General Comments 0
You need to be logged in to leave comments. Login now