binda
binda copied to clipboard
Performance bottlenecks
Issue
This line creates a long list of updates https://github.com/BindaCMS/binda/blob/master/app/models/binda/component.rb#L19
Expected behavior
It'd be best to use active job
How to reproduce the issue
- Create a structure
- Create some components
- Create a new field setting
This generates a long list of record updates in the main background processor.
System configuration
Binda version: 0.1.10
Rails version: 5.2
Similar issue can be found here https://github.com/BindaCMS/binda/blob/master/app/models/binda/board.rb#L34 https://github.com/BindaCMS/binda/blob/master/app/models/binda/repeater.rb#L11 ~https://github.com/BindaCMS/binda/blob/master/app/models/binda/component.rb#L18~
But the very 🥇 big bottle neck is this one: https://github.com/BindaCMS/binda/blob/master/app/models/binda/field_setting.rb#L79-L103
Last but not least, depending on the number of components affected by the selection field https://github.com/BindaCMS/binda/blob/master/app/models/binda/selection.rb#L141-L147