Commit 56e3bf1e authored by Milian Wolff's avatar Milian Wolff
Browse files

Intern MakeFileResolver defines and include paths.

This decreases the memory consumption for the defines/include paths
as queried by the CMake JSON import job considerably. And, since
we can now reuse existing Path instances, we don't need the costly
conversion most of the time, leading to a considerable performance
win as well.

Before, my kdevelop session took ca. ~230MB of memory, now this
number is down to ~153MB. Performance wise, I saw the kdevplatform
JSON file speed up from ~2.2s evaluation down to ~1.4s.
parent d09760fd
......@@ -692,7 +692,7 @@ PathResolutionResult MakeFileResolver::processOutput(const QString& fullOutput,
if (QFileInfo(path).isRelative())
path = workingDirectory + '/' + path;
ret.paths << Path(path);
ret.paths << internPath(path);
}
}
......@@ -705,7 +705,7 @@ PathResolutionResult MakeFileResolver::processOutput(const QString& fullOutput,
if (match.lastCapturedIndex() > 1) {
value = unescape(match.capturedRef(match.lastCapturedIndex()));
}
ret.defines[match.captured(1)] = value;
ret.defines[internString(match.captured(1))] = internString(value);
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment