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

Investigate caching #627

Closed
theofidry opened this issue Nov 17, 2016 · 1 comment
Closed

Investigate caching #627

theofidry opened this issue Nov 17, 2016 · 1 comment

Comments

@theofidry
Copy link
Member

As it has been design in #265, the result generated by the FixtureBuilder is a comprehensible graph of fixtures which is invariant: loading X times the same set of data with the FixtureBuidler will result each time in the same graph of fixtures.

However, we can see here (profile generated by the scenario 2 in profiling:

screen shot 2016-11-17 at 09 21 54

that it accounts for only ~7% of the time (it hardly gets more expansive) which was in that profile ~2.3s.

As such, I don't believe there is much to do in terms of caching on that side. However one thing that might be more interesting, is caching the whole result. Indeed if Faker seed is unchanged and not null, provided the user is not doing some weird random things, the result is expected to be the same.

There is however the question on how to do it: the input is faker generator see which is not necessarily injected directly in the input and an array of PHP data. And the result is a graph of objects.

@theofidry
Copy link
Member Author

Note that the cache needs to take into account wether or not the code source for the entities changed which makes it extremely complicated. Maybe an easier way would be to not care about that and allow the user to clear the cache manually when necessary.

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

No branches or pull requests

1 participant