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?

Have fun,
jel.
-- 
Otto-von-Guericke University     http://www.cs.uni-magdeburg.de/
Department of Computer Science   Geb. 29 R 027, Universitaetsplatz 2
39106 Magdeburg, Germany         Tel: +49 391 67 12768
_______________________________________________
opengrok-discuss mailing list
opengrok-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/opengrok-discuss

Reply via email to