You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticed a steady decrease in ui response in my new desktop app, which led me to discover a steady increase in memory consumption using the Window's Task Manager. As the memory usage climbs the UI response slows down, otherwise it starts out very responsive.
The app uses several context providers, all of which wrap the values in a Signal, except for the one value passed in through the LaunchBuilder. There are also several use_signal hooks.
All Signals are created in a hook.
Some Signals are passed to components as properties and a local function.
A lot of the Signals are read() or write() to pass immutable and/or mutable references to an external library.
Most of the values implement Copy (between 8 and 64 bits).
There are over 700 elements on the page and clicking any of them modifies the state.
I tried the following code changes with varying degrees of success:
I don't know if it is supposed to make a difference but the first thing I did was implement Eq, PartialEq on the remaining few of the structs that did not implement it. did not make any difference
changed the two Vecs to be updated in place instead of being completely replaced. seemed to make a small difference
commented out the one very frequent update all together. seemed to make a much bigger difference, at least it slowed it down a lot
However, the problem persists.
Any advice on how to track down the issue?
Unfortunately it's not open source code.
Thanks for the help,
Nejat
btw, the app starts out at about 7.8 MB and steadily climbs from there. At first, it was in increments of 1 MB but I did manage to slow it down to about increments of 200-300K.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi,
I noticed a steady decrease in ui response in my new desktop app, which led me to discover a steady increase in memory consumption using the Window's Task Manager. As the memory usage climbs the UI response slows down, otherwise it starts out very responsive.
The app uses several context providers, all of which wrap the values in a
Signal
, except for the one value passed in through theLaunchBuilder
. There are also severaluse_signal
hooks.Signal
s are created in a hook.Signal
s are passed to components as properties and a local function.Signal
s areread()
orwrite()
to pass immutable and/or mutable references to an external library.Copy
(between 8 and 64 bits).There are over 700 elements on the page and clicking any of them modifies the state.
I tried the following code changes with varying degrees of success:
I don't know if it is supposed to make a difference but the first thing I did was implement
Eq
,PartialEq
on the remaining few of thestruct
s that did not implement it. did not make any differencechanged the two
Vec
s to be updated in place instead of being completely replaced. seemed to make a small differencecommented out the one very frequent update all together. seemed to make a much bigger difference, at least it slowed it down a lot
However, the problem persists.
Any advice on how to track down the issue?
Unfortunately it's not open source code.
Thanks for the help,
Nejat
btw, the app starts out at about 7.8 MB and steadily climbs from there. At first, it was in increments of 1 MB but I did manage to slow it down to about increments of 200-300K.
Beta Was this translation helpful? Give feedback.
All reactions