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

Cache module list #34

Open
PVince81 opened this issue Mar 8, 2017 · 3 comments
Open

Cache module list #34

PVince81 opened this issue Mar 8, 2017 · 3 comments

Comments

@PVince81
Copy link
Contributor

PVince81 commented Mar 8, 2017

modules.json contains the list of JS files to load, but it is parsed every time.

It might make sense to cache this list somewhere (memcache) ?

The reason we need such file is because the list is used both for PHP script loading and also by the JS unit tests. Also the file specifies the correct loading order.

@jvillafanez any suggestions on caching ?

@PVince81 PVince81 added this to the 10.0 milestone Mar 8, 2017
@jvillafanez
Copy link
Member

I'm not sure if we need to cache this. I'd expect very little gain.

If this is also limited to the customgroups code and doesn't affect to other pages (users or settings, for example), I don't think we should do anything.

If we want to cache, I think it's better to use local memory caches such as acpu or xcache, and limit to those. Redis / memcache would connect through network so I'd expect to be slower than parsing the file from the FS.

If we just want a speed boost, I think changing the format to plain PHP should do it. It might also take advantage of opcache to load the file faster under some environments (http://php.net/manual/en/intro.opcache.php). In this case I don't think we need to cache anything ourselves directly.

@PVince81
Copy link
Contributor Author

If we change it to PHP, I still need a way to open/parse/execute this one file when running the tests from karma/jasmine, which is usually not possible 😦

@PVince81
Copy link
Contributor Author

Might not be needed to cache it.

Best would be to have a minifier in place in which case there will be only a single file to load.

So the code in question needs to detect whether we're in debug mode or release mode.

@PVince81 PVince81 modified the milestones: 10.0, backlog Apr 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants