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

Optimise frame selection and slot position listeners #313

Open
neilccbrown opened this issue Oct 29, 2024 · 0 comments
Open

Optimise frame selection and slot position listeners #313

neilccbrown opened this issue Oct 29, 2024 · 0 comments

Comments

@neilccbrown
Copy link
Collaborator

At the moment, frame selection and slot position are stored in the central store. Because frames need to know if they are in the selection, and slots need to know if they (or their neighbours) are focused, all frames in the code reactively listen to changes in the frame selection, and all slots reactively listen to changes in the cursor position. This means that as the code gets large, Vue is doing a lot of updates to the entire code when one of these items changes. We should be able to optimise this:

  • Frames only generally need to know if they are selected, and their position in the selection. We should be able to have some kind of Map such that frames listen to their own entry in the map, and some update function updates these items as needed.

  • Slots generally only need to know about focus changes within their slot (or slot structure I think it's called?). So we should be able to have a property on the parent (the slot structure?) which keeps track of cursor position with the slot structure, and each item (slot?) only listens to those in order to update.

This would speed up editing large code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant