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

Store selected card tabs locally. #11

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

liampwll
Copy link

@liampwll liampwll commented Sep 9, 2024

This significantly improves performance when many tabs are present as we do not need to send a request to query each one.

This has only been tested on my fork, but I don't see any changes that could cause issues at a glace.

This significantly improves performance when many tabs are present as we
do not need to send a request to query each one.
@Blady-Com
Copy link
Owner

Thanks for your improvement proposal.

I'm wondering about side effects.
Especially when Tab object is on the stack and removed at the end of a subroutine.
For example in Layout, Tab is removed at the end of On_Connect.

@liampwll
Copy link
Author

We could check the background colour in Tab_Selected with an and then, which avoid any issues with a new tab being allocated at the same address and would still improve performance. This does not deal with the user messing with the elements outside of the procedures provided by Gui.View.Card, but I'm not sure if it's reasonable to worry about that.

@Blady-Com
Copy link
Owner

I guess one may always worry about user troubling ideas :-)
What about storing Gnoga unique ID?

@liampwll
Copy link
Author

Would this cause issues if the user specifies an ID themselves or is reusing IDs already disallowed?

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

Successfully merging this pull request may close these issues.

2 participants