mfornet / acmx

Competitive programming made simple. VSCode extension.
MIT License
148 stars 9 forks source link

Extension causes high cpu load #77

Closed Salil03 closed 2 years ago

Salil03 commented 4 years ago

marx24.acmx-unresponsive.cpuprofile.txt

Here are the activation times:

"activationTimes": {
        "codeLoadingTime": 621,
        "activateCallTime": 1606,
        "activateResolvedTime": 27,
}

Find more details here: https://github.com/microsoft/vscode/wiki/Explain-extension-causes-high-cpu-load

76 might solve it.

mfornet commented 4 years ago

This is very helpful, didn't know about this analysis before. As you say #76 hopefully fix the problem, but probably the issue is with most of the work done synchronously.

Salil03 commented 4 years ago

I think everything done synchronously is the problem. We should go async(parallelization) wherever possible

mfornet commented 4 years ago

I'll keep this issue open while async mechanism is not in place.

@Salil03 I expect that #80 should solve big part of the problem, if that is the case after version 0.3.0 is published let me know

Salil03 commented 4 years ago

CPU-20200517T034222.873Z.cpuprofile.txt Here is the profile after the bundling

Here are activation times:

"activationTimes": {
        "codeLoadingTime": 106,
        "activateCallTime": 13409,
        "activateResolvedTime": 37,
}
Salil03 commented 2 years ago

@mfornet The actual reason for this was #132 . The checker was being compiled every time I ran the testcases. Which created an illusion of high CPU load.

mfornet commented 2 years ago

Well, this shouldn't be a problem anymore, given we are compiling only if there are changes. closing the issue.

Salil03 commented 2 years ago

Only if #132 works on all os. I think only windows has sol.exe, all others are sol right?

mfornet commented 2 years ago

Only if #132 works on all os. I think only windows has sol.exe, all others are sol right?

Yes, this is correct. Only windows uses .exe