«« Next » « Previous
«« Next » « Previous

Link Details

More voters = better DZone links! Login and vote now.
Link 37394 thumbnail

By ekabanov
via jspweaver.com
Published: Aug 27 2007 / 17:48

Usually JSP is first translated to regular Java code and then compiled into a Java servlet. JSP Weaver eliminates the Java generation and compilation stage by interpreting the JSP files on-the-fly. This reduces the time taken to reload a JSP up to 50 times bringing it from seconds down to milliseconds.
  • 10
  • 3
  • 1204
  • 341

Comments

Add your comment
User 236075 avatar

henk replied ago:

0 votes Vote down Vote up Reply

There's perhaps a slight advantage here for edit-test cycles, although one would suspect the execution time to be worse. In "change a page once, test a hundred times" scenarios the slower execution time may be more bothersome. Nevertheless, a nice technical accomplishment!

User 196387 avatar

Jevgeni Kabanov replied ago:

0 votes Vote down Vote up Reply

We'll post the benchmark soon, but the execution time difference is not noticeable in development. It's about 10%-20% overhead, which means it usually goes from 50ms to 60ms. Reloading time goes from 2-3s to 100-150ms.

User 182143 avatar

mezmo replied ago:

1 votes Vote down Vote up Reply

advertisement

User 60102 avatar

jodastephen replied ago:

0 votes Vote down Vote up Reply

Its a pity that this is commercial. I implemented this same design (interpreted JSP) for my company over 6 years ago. It saves oodles of time in development, and still runs fine in production on many of our sites. The main gain was in nested JSPs, where the interpreting technique ignores the nesting and always reloads, but compiled JSP often wouldn't pick up the changes. Our benchmarks showed that compiled JSP was quicker in production by about 30%, but we didn't spend much time on optimisation. One problem is that, last time I looked, the JSP spec *requires* that JSP is compiled - which really is overspecified IMHO.

User 196387 avatar

Jevgeni Kabanov replied ago:

0 votes Vote down Vote up Reply

Well, it's not overpriced (50$). We just want to get our investment back on this. Not everything should be open-sourced and we already donated our share to the community (http://www.araneaframework.org).

Spec might require that JSPs are "compiled", but there is no real way to check it. We do not claim that to be certified compatible, but it does work for everything we tried (within the limits of this milestone).

Why would you need to run this in production? We suggest to run it in development only and guarantee that it's stricter by the spec than your production server. This makes sure you'll have very little trouble with incompatibilities.

User 236075 avatar

henk replied ago:

0 votes Vote down Vote up Reply

[quote]Not everything should be open-sourced and we already donated our share to the community[/quote]

I agree with that. Most people easily spend almost double that money when going out for one night, but yet refuse to pay a single penny for software they use every day.

About JSP weaver, just how do you execute scriptlets without doing any compilation?

User 241883 avatar

toomasr replied ago:

0 votes Vote down Vote up Reply

Scriplet execution is done via Lightweight Scripting for Java through Beanshell. There is a news item about it:

http://www.jspweaver.com/index.php?pid=news&id=20070817184039

Add your comment


Html tags not supported. Reply is editable for 5 minutes. Use [code lang="java|ruby|sql|css|xml"][/code] to post code snippets.

Voters For This Link (10)



Voters Against This Link (3)