On 14.8.2012 23:13, Jens Elkner wrote:
On Tue, Aug 14, 2012 at 09:40:10PM +0200, Jens Elkner wrote:
On Tue, Aug 14, 2012 at 07:13:33PM +0200, Lubos Kosco wrote:
...
http://defect.opensolaris.org/bz/show_bug.cgi?id=13985
...
size wise please ;)
(index would grow too much)
Hmmm, wrt. index it shrinks. E.g. for AnalyzerGuru ~ -6.5% (compressed
-0.5%) - see http://iws.cs.ovgu.de/~elkner/tmp/og/ (AnalyzerGuru2.java
is the modified base href one. Just inserted the header and did a gsed
-i -e 's,/source/,,g' - perhaps not 100% correct).
Ohh - forgot the gsed -i -e
's,href="#,href="xref/opengrok-jel/src/org/opensolaris/opengrok/analysis/AnalyzerGuru.java#,g'
 AnalyzerGuru2.java ;-)
So result would be ~ -1%.

Anyway, after having a beer, a possibly easier to implement idea ploppt
up: The key is Javascript ;-) : Intercept clicks on anchors below #src:
if the path starts with '/source/' and servlet context is != '/source'
replace '/source/' with $servletContext/ and pass the modified link to
the handlers. Otherwise just pass through.

So one could even shrink the '/source/' to a marker like '$', make the
check even cheaper and gain some savings wrt. size (for AnanlyzerGuru
~ -5.5% uncompressed). AFAIS no other sources need to be touched.

Better?

if the meta header works (I'll try to dig up an example where it failed for me, but it might be that I just hit some browser bug back then, after all it's been couple of years and browsers were in even worse shape than they are now ;) ), I'd stick with that javascript is nice, but Sunrays are Sunrays and lynx/links/elinks is the key - call me old fashioned, but less javascript, the better and more compatible pages (I know we eventually will want to plug more js in there, but the time isn't now, maybe in a year or two, there is already enough js in the pages, they need a rework anyways, getting some UI test suite and even more clean up(what you started however is great, so respect!) )

hmm?
L


Have fun,
jel.

_______________________________________________
opengrok-discuss mailing list
opengrok-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/opengrok-discuss

Reply via email to