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

RepositoryView improvements #306

Merged
merged 9 commits into from
Jan 29, 2024

Conversation

lonemadmax
Copy link
Contributor

Some fixes and performance improvements.

For a typical repo with just a few branches the performance improvements are in fact negative, but we are talking about sub millisecond total time there. In my not very old desktop I need about 50 branches to get a clear positive impact, and we are still in the millisecond area.

On the other hand, we all know of that little project with more than 55 thousand tags. Populating the view without the changes takes my desktop 33 seconds without the outline option. With the outline option... well, after 3 hours it still has only 24250 items, and is inserting them at the speed of 0,75 items per second. After the changes it takes 28 seconds, whatever the setting.

Starting in the root wrongly discards items (for a/x and b/x the second
one is not shown) or places them in a different part of the tree (for
a/x/1 and b/x/2 we get the second one under a/x and there's also a
phantom b without children).
We may want to warn users when two names or their prefix parts differ
only in case, and coax them into renaming, as that may cause problems
with some filesystems when they are saved as files (which is not always
the case), but we should show them the truth.
The way we are visiting the items there's no point in going deeper.
And get out of the loop when the list ends. We are looping on the total
number of items, but not starting at the beginning.
We have a call to ItemUnderAt in a loop in FindItem. That itself loops
on the items in each call. With EachItemUnder we make that part linear
instead of quadratic.
It saves one search. We can only do it for the "flat" view atm.
Sort items so that we can also just add to the end in the tree view.
@jackburton79
Copy link
Collaborator

Hi.
First of all, thank you for your work! I only briefly looked at the PR from the phone so I can't say anything final yet but it seems good.
We'd obviously want to merge anything which improve performances.
Thank you again!

Copy link
Collaborator

@jackburton79 jackburton79 left a comment

Choose a reason for hiding this comment

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

Looks good to me. Also tested working correctly

@Freaxed
Copy link
Collaborator

Freaxed commented Jan 29, 2024 via email

@jackburton79 jackburton79 merged commit 9a7dc40 into Genio-The-Haiku-IDE:main Jan 29, 2024
10 checks passed
@lonemadmax lonemadmax deleted the RepositoryView branch January 30, 2024 14:30
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.

3 participants