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

Remove dependency mptt library #501

Closed
ciur opened this issue Dec 31, 2022 · 2 comments
Closed

Remove dependency mptt library #501

ciur opened this issue Dec 31, 2022 · 2 comments
Assignees
Labels
dependencies Pull requests that update a dependency file technical debt

Comments

@ciur
Copy link
Owner

ciur commented Dec 31, 2022

Remove the dependency on the following packages:

There are couple of reasons why above dependencies should be removed:

  1. libraries are buggy and are not well maintained.
  2. standard SQL now support with recursive statement i.e. common table expressions = cte which are useful when searching through hierarchies.

mptt is especially problematic as the tree structure is maintained in application level using extra attributes (left and right) and

  1. there is a full "tree rebuild" on every insert (very dubious practice) - left/right attributes need to be updated for all nodes!
  2. If there is a bug/error while "rebuilding tree" - the whole tree may become corrupt which is to say that some folder and documents just vanish from the radar - which is to say "not good"!

The funny part is that mptt/polymorphic/polymorphic tree is very easy to replace with own code.

@ciur ciur added the bug Something isn't working label Dec 31, 2022
@ciur ciur self-assigned this Dec 31, 2022
@ciur ciur added technical debt dependencies Pull requests that update a dependency file and removed bug Something isn't working labels Dec 31, 2022
@ciur
Copy link
Owner Author

ciur commented Dec 31, 2022

Work in progress...

@ciur
Copy link
Owner Author

ciur commented Jan 1, 2023

ciur added a commit to papermerge/papermerge-core that referenced this issue Jan 1, 2023
@ciur ciur closed this as completed Jan 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file technical debt
Projects
None yet
Development

No branches or pull requests

1 participant