DESCRIPTION

Get rid of regexps in STRING_ASCENDING_COMPARATOR

This makes the code both faster and easier to read (no complicated
lookahead/lookbehind pattern).

In a real-world use case for sorting 755 refs (a great number of tags),
the result is:

before: 22 ms
after: 3 ms

Using a list of 10000 elements also shows a factor of about 8.

Change-Id: Ide3f04ce4f13dd974c81e47f6f3c45abfaa15261
Signed-off-by: Danika Greer xxx@xxx.xxx


COMMENTS

author: Leslie Stephenson
date: 2011-06-04 11:12:12.000000000

Patch Set 1: I would prefer that you didn't submit this

(2 inline comments)

I've added some code style nits.

Line:44, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/CommonUtils.java -> Code conventions: we don't use curly brackets around single line blocks

Line:97, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/CommonUtils.java -> Code conventions: we don't use curly brackets around single line blocks

-------------------------------------
author: Danika Greer
date: 2011-06-04 12:00:16.000000000

Patch Set 1: (2 inline comments)

Done.

Line:44, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/CommonUtils.java -> Done

Line:97, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/CommonUtils.java -> Done

-------------------------------------
