When the server is started grunt dev, each time a file is changed the reload time takes ~8-10sec, which is _ok'ish_. This is already too slow compared to other tools, but the normal time for this project.
Over time, as we do more reloads, the reload time starts to increase as well, reaching 30-40s to reload the page.
This causes a High Usage of CPU and my PC starts to overheating. (up to 90潞C easily).
Besides that, it decreases a lot my productivity over time. A task that could take 3h probably will take +4h because of this slow reloading. (and I already do an extra effort to avoid saving a file too soon to spare some extra reloads)
So, our only solution is to restart the server and recreate the previous state (Cypress helps here) to get back to normal reload times. However, it's a matter of time to start having slow reloads again.
I tried to understand what's the cause but without success. :/
I think @snowteamer mentioned that there's an eslint --cache option that could possibly be used to speed things up.
Yes, but unfortunately it would probably not solve the issue of the system slowing down over time
@sandrina-p - Are you seeing the time increase when running locally? I'm wondering if this is Docker related.
One solution could be:
grunt build (which will remove it from grunt dev).grunt lint task that can be added to grunt testpre-push hook.With this:
grunt lint.I would also think to do the following:
Well, first we need to diagnose what the problem actually is. It's unclear that it's linter related.
I installed grunt-timer to try an observe the same behavior.
grunt dev and tried changing the frontend JavaScript about 20 times.I could not see any increase in time to build the code or reload the page.
@sandrina-p ...
It's not just about refresh in a short amount of time. When I tried that, it was working fine too. It's something that happens with a long period of time 30min-2h.
I think the best way to replicate is by doing some real issue/task that evolves sbp contracts (creating users, groups, invites, etc...) at the same time you change code related with views or comtracts too. Eventually you'll see it too.
@pieer has the same problem too
MacOS Mojave, latest chrome/firefox, Node 12
If the issue takes a long time before becoming apparent, it could be related to memory leaks, file descriptor leaks, or other ressources.
Is the output of top still normal when the problem arises?
Yes, the output is the normal. We also think the issue has something related with memory leak in code recompilation.
This might be fixed in #1020, please have a look at let us know!
Please re-open this issue if the problem re-occurs.
Most helpful comment
If the issue takes a long time before becoming apparent, it could be related to memory leaks, file descriptor leaks, or other ressources.
Is the output of
topstill normal when the problem arises?