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

Moving folders and files with permissions as non superuser takes too long #1480

Open
benzkji opened this issue Jul 6, 2024 · 6 comments
Open

Comments

@benzkji
Copy link
Contributor

benzkji commented Jul 6, 2024

Superuser click scissor icon (move): Almost immediatly, the move screen appears (dropdown with target folder).

Normal user does the same: It takes ages. Mostly I end up with a "Gateway Timeout". Copying also takes ages.

Does this happen because of permission tests? There are about 100 or 200 folders, an maybe 2000 files in my db, nothing special.

Normal directory listings also take a long time (6 seconds for a list with 79 items).

@fsbraun
Copy link
Member

fsbraun commented Jul 6, 2024

Version?

@benzkji
Copy link
Contributor Author

benzkji commented Jul 6, 2024

Sorry. Latest, 3.1.3.

@fsbraun
Copy link
Member

fsbraun commented Jul 7, 2024

@benzkji Do you have a chance of running a profile, or log the database access?

@fsbraun
Copy link
Member

fsbraun commented Jul 10, 2024

@benzkji For testing, I created a branch which caches permissions to avoid recalculation. This right now is just a guess. Would you like to give it a try?

Here's the branch: https://github.com/fsbraun/django-filer/tree/feat/permissions-cache or simply

pip install git+https://github.com/fsbraun/django-filer@feat/permissions-cache

Please let me know if this is an improvement. Might need some tests, too.

@benzkji
Copy link
Contributor Author

benzkji commented Jul 22, 2024

I can test this in August...thanks!!

@benzkji
Copy link
Contributor Author

benzkji commented Aug 7, 2024

1:1 comparison on my local machine: your branch is way faster. no more timeouts! thanks!

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

2 participants