binda icon indicating copy to clipboard operation
binda copied to clipboard

Performance bottlenecks

Open a-barbieri opened this issue 6 years ago • 2 comments

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

  1. Create a structure
  2. Create some components
  3. 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

a-barbieri avatar Sep 20 '18 09:09 a-barbieri

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

a-barbieri avatar Sep 20 '18 09:09 a-barbieri

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

a-barbieri avatar Sep 20 '18 09:09 a-barbieri