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

Improve tag-browser responsiveness #93

Merged
merged 1 commit into from
Sep 4, 2018
Merged

Conversation

lehitoskin
Copy link
Owner

This should speed things up. I also made it so the completely unmodified string is added as raw data. This way even if a path or tag label is more than +label-max+, we'll still be able to reference it without issue.

(table-column 'tags 'Tag_Label))
string<?))
; add them to the list-box, truncating if necessary
(send tag-lbox set
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤘

Copy link
Collaborator

@IonoclastBrigham IonoclastBrigham left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given tests show that the cost of calling set-data in a loop is negligible compared to the original algorithm, the looks good.

; set data for the unmodified label string
(for ([img (in-list tag-labels)]
[n (in-naturals)])
(send tag-lbox set-data n img))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Although, doesn't this sort of negate the speed-up from calling set only once, above?

@IonoclastBrigham IonoclastBrigham merged commit 327a834 into master Sep 4, 2018
@lehitoskin lehitoskin deleted the optimize-browser branch August 22, 2021 20:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants