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

Performance impact #24

Open
pafnow opened this issue Jul 22, 2022 · 4 comments
Open

Performance impact #24

pafnow opened this issue Jul 22, 2022 · 4 comments

Comments

@pafnow
Copy link

pafnow commented Jul 22, 2022

Hi,
Thanks for this module, it is a really good enhancement, and i'm using it often now.
However, I have noticed that using this progressbar seems to have some impacts on the performance/speed of the process.
For example, without progressbar, the progress takes around 30 seconds, but with the progressbar, it will take 1min30.
I am the only one to notice this ? Is it expected ?

Thanks

@gmarczynski
Copy link
Owner

gmarczynski commented Jul 24, 2022

Hi,

Thanks!

The performance impact depends on the processing cost of a single iteration.
It should be negligible for relatively costly iterations, like db access (mesured in miliseconds). However, it may be significant for very light computations, like in-memory computing.
Can you share the nature of your iterations which give you the 200% overhead? How many iterations per second?

Please note that the progress is reported to the log and to the web client every 5 seconds, so having too many iterations per sec. does not make much sense. If this is a case, I would recommand dividing the computation in batches and measuring the progress of batch completions.

Best,
G.

@pafnow
Copy link
Author

pafnow commented Jul 25, 2022

Hi, thanks for your answer,
It is indeed a mostly in-memory computing process, with around 2000 iterations in the use case described before.
So it is 70 iterations per second without progress and down to 25 with progress bar.

I understand your idea of using batches, will try to see how it can fit nicely in the code (ideally adding a function on BaseModel to make it reusable).

@gmarczynski
Copy link
Owner

Surprising. 70 iterations per sec should not be a big deal. What is your Odoo version?

@pafnow
Copy link
Author

pafnow commented Jul 25, 2022

Odoo v14

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