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

Speed Issue? #520

Closed
jijoel opened this issue Apr 5, 2018 · 4 comments
Closed

Speed Issue? #520

jijoel opened this issue Apr 5, 2018 · 4 comments

Comments

@jijoel
Copy link

@jijoel jijoel commented Apr 5, 2018

Have you found performance to degrade significantly when many modules? I am working on a large project which may ultimately have several dozen modules; currently at 8, we're experiencing a noticeable lag before getting results. I ran some quick time tests:

Starting with a fresh installation of laravel on homestead, phpunit finishes in about 2.5 seconds on my machine.

composer require nwidart/laravel-modules
for i in seq -w 1 100; do time php artisan module:make Test$i; done

The more modules we have, the slower the artisan command runs:

001  real 0m1.582s   user 0m0.180s  sys 0m0.792s
042  real 0m12.797s  user 0m0.524s  sys 0m6.660s
071  real 0m17.172s  user 0m0.692s  sys 0m9.260s
100  real 0m29.843s  user 0m1.268s  sys 0m15.056s

Once finished, running phpunit takes 14.5 seconds, still for the same two tests.

In a browser (wget), we go from 0.733 to 6.854s to respond with the welcome page.

I love the concept, but how do we make it faster?

@nWidart

This comment has been minimized.

Copy link
Owner

@nWidart nWidart commented Apr 5, 2018

Hello,

I've had projects with 10-15 modules, and no performance hit, as in sub 200ms. And that's in AsgardCMS which adds more overhead than just the modules package.
I've heard of other people with similar amounts of modules and more without any performance issues either.

Maybe you could try to profile you app using blackfire.io . It's using that tool that many performance improvements have been applied on the package.

@nWidart

This comment has been minimized.

Copy link
Owner

@nWidart nWidart commented Apr 26, 2018

I'll close this due to inactivity.

@nWidart nWidart closed this Apr 26, 2018
@pjhartin

This comment has been minimized.

Copy link

@pjhartin pjhartin commented Feb 11, 2020

I'm noticing the same in development environment, although it is yet to be deployed to a production environment, so I don't want to optimize too early. But simply having the modules register & boot on each request seems like it is impacting response times for a simple 200 OK endpoint.

@nWidart

This comment has been minimized.

Copy link
Owner

@nWidart nWidart commented Feb 12, 2020

That's how laravel and php en general works though.

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

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.