On Tue, Jan 17, 2012 at 10:56:47PM +0000, [email protected] wrote: > https://defect.opensolaris.org/bz/show_bug.cgi?id=19105 > > --- Comment #15 from Vladimir Kotal <[email protected]> 2012-01-17 > 22:56:40 UTC --- > (In reply to comment #14) > > (In reply to comment #12) > > > > > description: > > > Bug 19105 - convert the link to parent directory to .. and move it to > > > the > > > file listing > > > > > > modified: > > > src/org/opensolaris/opengrok/web/DirectoryListing.java > > > > Basically ok, however, creating a new Formatter [and Date] for each entry > > produces [a lot] of garbage (mem) + processing overhead. It should be > > reused. > > The Formatter could be even made static and be cloned if needed. > > Point taken (I am no Java programmer). Could you suggest a diff ? I can test > it.
Need to think about a little bit more at the weekend: What first comes into mind is, to just insert '..' at pos 0 in the file list, move the body of PrintDateSize back, and moving the DateFormatter [and perhaps Date] at least out of the loop (the dotdot var is overhead -> rm). However, if the list is not a linked list, this would usually trigger an array copy ([alloc+]memmove), which should still be faster than creating several formatters, but still a little bit stinky as well ... Regards, 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-dev mailing list [email protected] http://mail.opensolaris.org/mailman/listinfo/opengrok-dev
