treasure-data / digdag

Workload Automation System
https://www.digdag.io/
Apache License 2.0
1.31k stars 221 forks source link

[digdag-ui]Workflow Page bloats memory usage of browser #1652

Closed snagasawa closed 2 years ago

snagasawa commented 3 years ago

WorkflowVIew uses ReactInterval to fetch the project's archive file every few seconds in order to display the workflow definition and task files. https://github.com/treasure-data/digdag/blob/060c9a05051a450257a24c97404bb0a969f2fe67/digdag-ui/console.jsx#L1023 https://github.com/treasure-data/digdag/blob/ea9d73c57cc9a0511a11170a633c96b75f17fa1d/digdag-ui/console.jsx#L1025 https://github.com/treasure-data/digdag/blob/060c9a05051a450257a24c97404bb0a969f2fe67/digdag-ui/model.js#L329

But, fetching the project's archive file bloats memory usage of the browser. Some of archive files of my Digdag projects over 10MB.

This is a capture of the Task Manager in Google Chrome. As long as the Workflow Page is open, the number of Dedicated Workers will continue to grow like this. image

And here is the list of requests in the network tab of devtools. image

It seems too heavy to fetch the archive file every few seconds.

Any feedback would be much appreciated. Thanks.

seiyab commented 2 years ago

I wonder that garbage collection doesn't work.

snagasawa commented 2 years ago

@seiyab Thanks for replying. I created PR fix this issue. https://github.com/treasure-data/digdag/pull/1741