Giter Club home page Giter Club logo

Comments (3)

sirthias avatar sirthias commented on July 29, 2024

Paul,
thanks for the report and the praise (also the ones via twitter!).
Are you seeing this initial delay with your own application or one of the examples?
The markdown-server example really does have a great initial delay due to the pegdown markdown-parser being created at the bytecode-level...
Apart from this we haven't experienced an especially slow startup so far.
Is there something special about your use case?
Cheers,
Mathias

from spray.

 avatar commented on July 29, 2024

You're more than welcome!

I don't believe there's anything particularly unusual about our use case so far, and once the initial request has been processed, successive operations are nice and zippy. On my 2.13 GHz, 4G RAM MacBook Air running either Tomcat 7.0.12 or Jetty 8.0.0.M2, I see the first operation go from ~1015ms to successive operations taking ~35ms. You can see the reason why very easily: please just launch your server JVM with the "-verbose:class" option and examine the logs. Upon handling the first request, you'll see an enormous number of classes loaded. Again, many are from the cc.spray package, but a much, much larger number are from parboiled. Anything you can do to preload these packages will be a big win for clients of that first request. :-)

Thanks!
Paul

from spray.

sirthias avatar sirthias commented on July 29, 2024

Thanks, Paul, for these details.
We'll look into this and whip something up for spray 0.6.0, which is not far at all after todays events...

Cheers,
Mathias


[email protected]
http://www.spray.cc

On 12.05.2011, at 22:11, psnively wrote:

You're more than welcome!

I don't believe there's anything particularly unusual about our use case so far, and once the initial request has been processed, successive operations are nice and zippy. On my 2.13 GHz, 4G RAM MacBook Air running either Tomcat 7.0.12 or Jetty 8.0.0.M2, I see the first operation go from ~1015ms to successive operations taking ~35ms. You can see the reason why very easily: please just launch your server JVM with the "-verbose:class" option and examine the logs. Upon handling the first request, you'll see an enormous number of classes loaded. Again, many are from the cc.spray package, but a much, much larger number are from parboiled. Anything you can do to preload these packages will be a big win for clients of that first request. :-)

Thanks!
Paul

Reply to this email directly or view it on GitHub:
#14 (comment)

from spray.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.