Add delay to refresh the design panel view when making changes in the code

Hi,

MacOS, M2 Pro chip

I am often coming across this issue where after running Wappler for a couple of hours, the memory usage goes up significantly from the memory usage when Wappler app is first opened. The two screenshots below show memory usage at the start and usage after running Wappler for about 2 hours.

It seems the main reason for this significant increase in memory usage is an instant refreshing of the design view when making any modifications in the code view. Over a short period of time, the constant refresh process begins to consume more and more memory and the code view starts lagging and becomes slow to respond. When this happens, Wappler app has to be restarted to release the excess memory usage and make the code view responsive again.

I have noticed that the memory usage stays fairly stable while working with the APIs.

Is there a setting or a way to add delay to refresh the design panel view when making changes in the code view? Something similar to debounce? I think a better way to handle this could be to move the instant refresh process after saving the code view when any modifications have been made.

Can’t say I experience any issues on my old (2019) Intel MacBook working in Split View 100% of the time. How much delay are you thinking and do you experience any resource spikes when just using code view?

Hi Brad,

I experienced similar issues on the old Intel MacBook, but that was 2015 model with only 8GB RAM. The CPU usage I have included in my earlier post is from the new Mac with M2 Pro Chip. So, this issue could be related to M2 chips only.

I think a system setting to add delay by the user according to their requirements is better than hard coding a delay in the app connect. The most significant spike is in memory usage, and it happens regardless of just using the code view or split view.