Discussion:
[thg-dev] Memory leak (thg 3.3)?
André Sintzoff
2015-02-16 10:26:06 UTC
Permalink
Hello,

I'm facing a strange issue with some files in private repositories
since thg 3.3.

When using the File History / Annotate view (using the context menu
item in the workbench), the memory used by thgw.exe process is
increasing rapidly (about 100 kB/s on a i5-4300M and about 400 kB/s on
an i7-3770).

Hopefully, this issue seems to not occur when using Revision History
in Windows Explorer.

Any idea?

Thanks
--
André
André Sintzoff
2015-02-16 12:31:28 UTC
Permalink
Post by André Sintzoff
Hello,
I'm facing a strange issue with some files in private repositories
since thg 3.3.
When using the File History / Annotate view (using the context menu
item in the workbench), the memory used by thgw.exe process is
increasing rapidly (about 100 kB/s on a i5-4300M and about 400 kB/s on
an i7-3770).
Hopefully, this issue seems to not occur when using Revision History
in Windows Explorer.
Any idea?
According to hg bisect,
2b5b338a9f0e annotate: fetch line information by command (fixes unsafe
thread access)

could have introduce the issue.
--
André
Yuya Nishihara
2015-02-16 12:58:56 UTC
Permalink
Post by André Sintzoff
Post by André Sintzoff
When using the File History / Annotate view (using the context menu
item in the workbench), the memory used by thgw.exe process is
increasing rapidly (about 100 kB/s on a i5-4300M and about 400 kB/s on
an i7-3770).
Hopefully, this issue seems to not occur when using Revision History
in Windows Explorer.
Any idea?
According to hg bisect,
2b5b338a9f0e annotate: fetch line information by command (fixes unsafe
thread access)
could have introduce the issue.
Probably the console log burst because of unexpected pickle output.
Can you test with the following (incorrect) patch?

diff --git a/tortoisehg/hgqt/cmdcore.py b/tortoisehg/hgqt/cmdcore.py
--- a/tortoisehg/hgqt/cmdcore.py
+++ b/tortoisehg/hgqt/cmdcore.py
@@ -477,7 +491,7 @@ class CmdServer(CmdWorker):
self._writeBlock(data[start:start + size])

_idlechtable = {
- 'o': _processOutput,
+ #'o': _processOutput,
'e': _processOutput,
}


It appears that QProcess does never discard its write buffer. So it can
write the previous "runcommand" request when the server process is restarted.
As a result, the output of the last "runcommand" does not captured, and
sent to the console.

Regards,

Loading...