jgraph / drawio-desktop

Official electron build of draw.io
https://www.diagrams.net
Apache License 2.0
47.87k stars 4.82k forks source link

Severe lag moving the drawio window #1780

Closed jeroenvriesman closed 1 week ago

jeroenvriesman commented 3 weeks ago

All drawio versions 22.1.16 and higher show a severe lag when moving the drawio window under Windows. All versions 22.1.15 and lower don't have this problem.

The effect is the strongest when there are pictures in the drawing, any of the cloud IBM examples will do. I've attached an example, which is just one of the IBM examples copied 5 times. lag_test_drawing.zip

My laptop is i5-1135G7, 2.4GHz, 8GB windows 10 enterprise 22H2.

Also tested on an i7, same problem.

On Linux drawio does not have this problem.

Disabling automatic backup doesn't fix the problem. Maybe the windows related change https://github.com/jgraph/drawio-desktop/1433 introduces the problem.

From previous posts in https://github.com/jgraph/drawio/issues/3636 it's clear that the macOS version doesn't have this problem.

davidjgraph commented 3 weeks ago

We have millions of users on windows, if it were a widespread issue this repo would be underwater. There's something specific to your machine.

Either something like a virus checker that doesn't like a new signature on later releases, or the storage used doesn't like a write or flush change in 22.1.5.

davidjgraph commented 3 weeks ago

We still cannot repeat. I would suggest to find an alternative tool given the problems you're having.

jeroenvriesman commented 2 weeks ago

Update, I found the cause by measuring the cpu/mem/net stats when moving teh drawio window. In is indeed related to https://github.com/jgraph/drawio-desktop/1433. drawio is updating the config.json continuously when the window is moving. For a local filesystem or a high performance network this is fine, but when the config.json is on a network with lower throughput and/or higher latency (for example , working over a company vpn ) this causes the severe lag in window operations like moving or resizing. Possible solutions: a) a feature to turn off writing the window position to the json. b) a feature to choose a local location for the config.json (we also have diskless clients, so this doesn't solve all the problems) c) make the write to the config.json asynchronous so write latency doesn't affect the application

I think option c is the most general solution. Maybe option a is easy to implement, it would just disable 1433 which is not that important.

davidjgraph commented 2 weeks ago

Cool, thanks for taking the time to investigate and report back.

m-mohamedin commented 2 weeks ago

Will be fixed in the next release Thanks for the report

jeroenvriesman commented 2 weeks ago

Thanks for the fix Mohamed. Only writing the window info upon close is a indeed a better idea than my suggestion.

davidjgraph commented 1 week ago

Fix in 24.6.1