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

Improving startup time #186

Open
PragTob opened this issue Jan 2, 2013 · 9 comments
Open

Improving startup time #186

PragTob opened this issue Jan 2, 2013 · 9 comments
Milestone

Comments

@PragTob
Copy link
Member

PragTob commented Jan 2, 2013

Hi everyone,

shoes4 is a bit slow too start which is mostly due to jRuby (at least, I figure so), the good old Charles Nutter just tweeted a link to an article in the jRuby wiki which is all about improving startup time. Maybe it's worth looking into.

@davorb
Copy link
Member

davorb commented Jan 7, 2013

Maybe it's just me, but I feel like this has gotten a lot worse lately, so I suspect that it's more to do with our code than JRuby itself. It might be a good idea to have a look with the profiler and see where the problem is.

@Anonyfox
Copy link

Anonyfox commented Jan 7, 2013

@headius updated the section about tiered-compilation just after i asked him about startup-time problems.

-XX:+TieredCompilation -XX:TieredStopAtLevel=1

as flags to jruby reduced the time for require'ing gems by 50%, but didn't affect something else as far as i could see. My specific problem was exactly this: several seconds for startup just for some requires, and the tiered compilation flags reduced this and only this.

/agree with davorb, profiling would be reasonable.

hope this helps

@wasnotrice wasnotrice mentioned this issue Jan 8, 2013
@wasnotrice
Copy link
Member

I tried some informal profiling of startup. It looks like almost all of our time is spent in require. The switches on the wiki page didn't seem to affect startup time for my jruby (I think they are enabled by default). However, when using bin/shoes we were spinning up jruby twice. That's a big hit. I converted bin/shoes to a shell script, and that seems to have cut startup time almost in half on my machine. Try it out :)

edit: this change is in #187

@jrgifford
Copy link
Member

The pull request @wasnotrice submitted above seems to cut it in half for me as well (platform is ubuntu as usual).

@davorb
Copy link
Member

davorb commented Jan 8, 2013

The startup was roughly 30% faster with your changes. But it's still too
slow. We should consider adding a splash screen if we can't get the
startup time to be less than five seconds.

Here are my results:
https://gist.github.com/4486023

However, I wouldn't put too much effort into optimizations before we've

gotten one of the pre-releases out of the door.

Davor Babic
davor@davor.se

James Gifford wrote:

The pull request @wasnotrice https://github.com/wasnotrice submitted
above seems to cut it in half for me as well (platform is ubuntu as usual).


Reply to this email directly or view it on GitHub
#186 (comment).

@wasnotrice
Copy link
Member

The startup was roughly 30% faster with your changes. But it's still too slow. We should consider adding a splash screen if we can't get the startup time to be less than five seconds.

Absolutely. This is just some low-hanging fruit :)

@PragTob
Copy link
Member Author

PragTob commented Jan 8, 2013

I like low hanging fruits :-)

@PragTob
Copy link
Member Author

PragTob commented Jan 9, 2013

Okay merged, thanks!

I'd be pro for keeping this issue open though since most likely, we can still make improvements! :-)

@jrgifford
Copy link
Member

Blech. Splashscreens. If we're going to design and implement a splash screen, we should seriously reconsider life.

we should spend the time on making it faster, instead. Or am I just being a young idealistic fool? 😀

@PragTob PragTob added this to the 4.0.0-rc1 milestone Feb 20, 2014
@jasonrclark jasonrclark modified the milestones: 4.0.0.rc1, 4.0.x Sep 27, 2017
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

6 participants