Hello Odoo Community,
I have noticed some performance challenges in Odoo, particularly with the ORM and the notification system, which seem to be impacting scalability. I would appreciate insights or suggestions on how to handle these issues more efficiently. Here are the key concerns:
- Scalability of Notification System:
- The current notification system in Odoo processes data sequentially, one after another.
- This design causes significant delays, especially when sending bulk notifications, such as emails.
- Instead of processing each notification one by one, a more scalable approach would be to collect data and process and update in bulk, potentially reducing the time taken significantly.
- ORM Performance in Bulk Operations:
- The ORM in Odoo is not optimized for bulk operations.
- Performing operations one record at a time (e.g., sending thousands of emails or inserting/updating data in the database) makes the system slow and inefficient.
- In Python, it is easy to write efficient code that sends thousands of emails or saves data in bulk using batch operations, but Odoo seems to lack this efficiency out of the box.
- Impact on Application Speed:
- When using the ORM for bulk insertions or updates, the app becomes noticeably slow due to the use of single-query transactions.
- This is especially problematic when handling large datasets or notifications (emails, messages) in bulk.
My Request:
- If I'm mistaken in my understanding, could someone please clarify or offer solutions to overcome these challenges?
- Are there recommended best practices to optimize the Odoo ORM for bulk operations?
- What improvements can be made to the notification system for better performance and scalability?
Looking forward to your feedback and suggestions!
Thank you.