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

saving a record is so slow why? #149

Open
despiegk opened this issue Jan 31, 2018 · 1 comment
Open

saving a record is so slow why? #149

despiegk opened this issue Jan 31, 2018 · 1 comment
Milestone

Comments

@despiegk
Copy link
Contributor

No description provided.

@despiegk despiegk added this to the beta4 milestone Jan 31, 2018
@Hamdy
Copy link
Contributor

Hamdy commented Jan 31, 2018

There's some hidden processing for saving operation

  • First, if you create a record, we need to generate unique ID (5 digits) that doesn't exist
    so we have to make extra query(ies) on that model to pick up an ID that doesn't exist

  • We have to detect and cache all changes that is a result of your action, for example if you updated a task related to contact , this means, contact info will change, and assignee data will change, ...
    so we have to detect these changes in order to commit them directly to data git repo and push them
    the commit and push is async process, but detecting and caching changes is a bit heavy.remember we are using flask admin and we don't control the (save) operation directly so we need to use somw ORM magic to detect changes and process them before saving then later on cache them after saving
    so we intercept the saving process.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants