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 the performance of the file manager #1839

Merged
merged 1 commit into from
Jun 17, 2020

Conversation

Toflar
Copy link
Member

@Toflar Toflar commented Jun 16, 2020

I found a huge performance bottleneck in the file manager.

To check for permissions, we count all the files for every single delete button callback recursively. However, we only need to know if there is at least something so the actual number is completely irrelevant to us and we can early return.

Saved 2 seconds of loading time for my use case :)

… is at least one result so we can early abort
@Toflar Toflar added the bug label Jun 16, 2020
@Toflar Toflar added this to the 4.9 milestone Jun 16, 2020
@Toflar Toflar self-assigned this Jun 16, 2020
fritzmg
fritzmg previously approved these changes Jun 16, 2020
ausi
ausi previously approved these changes Jun 16, 2020
@leofeyer
Copy link
Member

leofeyer commented Jun 16, 2020

That's great! 🎉 Can you rebase your changes onto the 4.9 branch please?

@Toflar Toflar changed the base branch from master to 4.9 June 16, 2020 15:19
@Toflar Toflar dismissed stale reviews from ausi and fritzmg June 16, 2020 15:19

The base branch was changed.

@Toflar
Copy link
Member Author

Toflar commented Jun 16, 2020

I branched correctly but picked the wrong target branch :)

@leofeyer leofeyer merged commit f4c6af6 into contao:4.9 Jun 17, 2020
@leofeyer
Copy link
Member

Thank you @Toflar.

@Toflar Toflar deleted the performance/file-manager branch June 17, 2020 07:06
@leofeyer leofeyer changed the title Improve performance of file manager Improve the performance of the file manager Jul 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants