Skip to content
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

The VariablesMenu is too slow #404

Closed
c3d opened this issue Oct 8, 2023 · 0 comments
Closed

The VariablesMenu is too slow #404

c3d opened this issue Oct 8, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@c3d
Copy link
Owner

c3d commented Oct 8, 2023

When the VariablesMenu is active, the text editor becomes very sluggish on DM42.

Observed with the Demo content while on battery power.

The text editor is quite responsive even with multi-line content when another menu of similar complexity is active, including menus with animations. For example, the Disp menu still has an animation on the Command menu entry when the long command is selected, but even with that menu active, the editor remains snappy.

Possible cause (to be investigated): scanning through the object list is expensive because it has to go deep? Seems unlikely since the representation of program objects makes it relatively easy to skip over them.

Other possible cause: all menu items being animated?

@c3d c3d added the bug Something isn't working label Oct 8, 2023
c3d added a commit that referenced this issue Oct 12, 2023
The mechanism for updating the `VariablesMenu` was too aggressive.
It updated the whole series of menus after every single key.
The same thing was true with the catalog.

Change to a mechanism where updates are only made when necessary.
For example, the `VariablesMenu` only updates when a `Sto` or similar
operation changes the content of the directory.

Fixes: #404

Signed-off-by: Christophe de Dinechin <christophe@dinechin.org>
@c3d c3d closed this as completed in f906296 Oct 15, 2023
c3d added a commit that referenced this issue Oct 15, 2023
New features
- `root` for numerical root finding (#36)
- `integrate` for numerical integration (#42), using Romberg algorithm
- Auto-simplification of `i*i` as -1 (#411)

Bug fixes:
- `LastArg` and `Undo` were not correct after comparisons (#402)
- Invalid equation created for symbolic comparisions, e.g `A=B` (#403)
- Converting `100!` to a based number would display `#00` (#405)
- Avoid crash if running out of memory processing fractions
- Possible memory corruption during negation of complex numbers (#406)
- Fix typo in `User` settings menu, rename it as `UI`
- `->Q` could give incorrect result for decimal32 and decimal64 (#409, #410)

Enhancements:
- Accelerated editor when `VariablesMenu` is shown (#404)
- Being able to pass equations containing equal sign to solver (e.g. `X+1=3`)
- Insert a single colon `:` inside text
- Sharing more code between plotter, solver and integrator
- Simulator uses the DB48X keyboard by default
- Label for constants menu changed to `CNST`

Signed-off-by: Christophe de Dinechin <christophe@dinechin.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant