Comments (3)
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.
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.
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!
PaulReply to this email directly or view it on GitHub:
#14 (comment)
from spray.
Related Issues (20)
- Deploying Spray on Amazon ec2
- StackOverflowError in spary.http.Uri
- Nesting of authorize directives not possible? HOT 1
- spray-can socket activation
- Migration to Akka? HOT 3
- Spary Router: GET requests falls into other methods HOT 1
- Cache-Control header not properly supported
- Cookie parsing fails on bad cookie, throws the rest away
- Support media type application/vnd.apple.pkpass
- GzipDecompressor Fails On Files larger than 4g HOT 3
- It is impossible to reject malformed optional form fields with anyParams
- akka2.3.4 HOT 1
- Spray doesn't support RFC 5987 extended parameter notation (eg: for Unicode upload filenames) HOT 5
- spray-routing-shapeless2 1.3.4 jar is missing HOT 3
- Header not set on rejection from authentication directive HOT 3
- scala 2.12 publishing HOT 2
- [Community help required] update for scala 2.12 HOT 3
- user-agent headers are too eager in assuming data format
- http://GET fails with 400 sometime HOT 3
- Getting late response from Spray-Client
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from spray.