-
-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
🐞 Noticeable delay occurs when changing Settings #1247
Labels
bug
Something isn't working
Comments
This was referenced Apr 28, 2023
matthijseikelenboom
pushed a commit
to CodeEditApp/CodeEditSourceEditor
that referenced
this issue
Apr 29, 2023
<!--- IMPORTANT: If this PR addresses multiple unrelated issues, it will be closed until separated. --> ### Description This PR fixes an issue where the view would be reloaded too often. This happened because `updateNSViewController` is called too often. This mostly happens because of a change in the environment, which gets passed to the NSViewControllerRepresentable in the `context` variable. Manual diffing is applied to check if any variables that matter have changed. If not, nothing is updated. The initializer has also changed, a few variables are now just values instead of bindings. These don't have to be bindings, as the textview won't update variables. ### Related Issues CodeEditApp/CodeEdit#1247 ### Checklist <!--- Add things that are not yet implemented above --> - [x] I read and understood the [contributing guide](https://github.com/CodeEditApp/CodeEdit/blob/main/CONTRIBUTING.md) as well as the [code of conduct](https://github.com/CodeEditApp/CodeEdit/blob/main/CODE_OF_CONDUCT.md) - [x] The issues this PR addresses are related to each other - [x] My changes generate no new warnings - [x] My code builds and runs on my machine - [x] My changes are all related to the related issue above - [x] I documented my code ### Screenshots <!--- REQUIRED: if issue is UI related --> <!--- IMPORTANT: Fill out all required fields. Otherwise we might close this PR temporarily --> Signed-off-by: Wouter01 <[email protected]>
We've discovered the root of the problem. The MonospacedFontPicker is causing this. When this is removed, performance is fine when changing a font size. If the user has a lot of fonts installed, for whatever reason it effects other fields in the form. If the Other Fonts picker is taken out of this view, everything seems to be fine. Things we might try:
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
Changing any setting causes a slight delay before the UI is updated to reflect the change. This is problematic when interacting with a stepper control when it is common to click several times consecutively or a text field when it is common to type characters consecutively. The UI doesn't have time to respond resulting in a sluggish UI.
To Reproduce
Expected Behavior
The UI should respond to user action immediately.
Version Information
CodeEdit: 0.0.3-dev (32)
Additional Context
This might be because it is writing to settings.json in our Application Support folder. I think it waits until it has been updated (not sure, just a theory). I think we should be handling this more optimistically and not be so dependent on writing to the file.
Screenshots
Screen.Recording.2023-04-27.at.2.35.06.PM.mov
Related issues
The text was updated successfully, but these errors were encountered: