Skip to content
This repository has been archived by the owner on Jul 19, 2021. It is now read-only.

Is it the best way to make sure field instances exists? #164

Open
a-barbieri opened this issue Feb 9, 2018 · 0 comments
Open

Is it the best way to make sure field instances exists? #164

a-barbieri opened this issue Feb 9, 2018 · 0 comments

Comments

@a-barbieri
Copy link
Collaborator

Expected behavior

The main objective is to find an instance of a field for each component after I created a field setting for it. That's for sure.

To obtain this behaviour Binda runs a callback which creates in batch all instances for each component immediately after the field setting is created. It's ok for 100 components, because running at 0.4ms it takes 40ms. But if a database has 10000 entries, it'd take 4s or maybe more...

If we are adding 4 field setting at the same time we are going to hit the database with a operation that will run for 16s.

I'm not sayng it's not fine, but it might be a good idea to warn the user with a alert saying that above 1000 components the process can take a while.

System configuration

Binda version: 0.1.5

Rails version: 5.1.4

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

No branches or pull requests

1 participant