News for hackers. Stuff that matters.
Re:Lucene's FuzzyQuery is 100 times faster in 4.0 by mgkimsal on Wednesday April 27, 2011 @09:31AM (#2489398)
This is not to pick on Lucene in particular - not 100% sure it even applies - but I'm always a bit mixed when massive speed improvements take place in projects. It tends to validate earlier criticisms about the speed of a particular project which were dismissed (and often countered) by community members.

"Java is slow." "No, it's not - it's hella fast!" "But it takes 4 minutes to launch every Java app I ever use." "Dude, you're doing it wrong - everything I write and use in Java is so fast I have to sometimes wonder if Java didn't magically upgrade my CPU!" etc.

Then a new JVM will come out with measurably faster performance, which validates the earlier view that something was indeed slow, but it's ignored/overlooked/glossedover by proponents.

The other response often is "the code's open, fix it yourself", which generally does no one any good. Just because I'm qualified to determine that something is slow doesn't mean I have the foggiest clue how to fix it. Nor am I encouraged that you'll actually take my patches back (even if I could write them) because you (project team) don't seem to think there's a speed problem in the first place.

This isn't to rag on Lucene's team - I've no idea if this applies to them in particular - it's just something that popped in to my head when I read the title.

The article itself is interesting, describing how the speedup was implemented starting with Python - I won't spoil the rest of the story :)

Re:Lucene's FuzzyQuery is 100 times faster in 4.0 by m0th87 on Wednesday April 27, 2011 @12:01PM (#2489925)
Java is fast for long-running applications. Once the JIT kicks in, important code is natively compiled. But it does take a long time to start. This is why Java is big in the server space, and not so much for desktop applications.

The same holds true for Lucene. It works wonderfully well for most queries. These optimizations are strictly for fuzzy queries, which no one ever used in my deployment at least.

This is the absurdity of performance measurement. Everyone wants to quantify it into a single score. But doing so is like making a 100m track sprinter race a cross country runner. Wtf is your criteria?

Re:Lucene's FuzzyQuery is 100 times faster in 4.0 by mgkimsal on Wednesday April 27, 2011 @12:16PM (#2489983)
I was using it as an example - KDE could have been another, or MySQL, or whatever.

The criteria in the Java example - conversations I've had with people directly - was launching and running a desktop app. Things like clicking a menu option and being able to watch the menu draw (< 1 second, but still noticeable). I've sat down with a couple of die-hard Java guys years ago and finally showed them the slowness I would complain about. On my machine - click X, watch Y take a long time, etc.

"Oh, that's fine! What are you complaining about?"

"Well, when I run a 'native' app, I don't notice any of these slow operations."

"Oh, it's fine - that's hardly noticeable at all! Why do you care? Java's fine!" and so on.

So... often judgements really are in the eye of the beholder, regardless of what numerical benchmarks show.

Re:Lucene's FuzzyQuery is 100 times faster in 4.0 by mgkimsal on Wednesday April 27, 2011 @12:17PM (#2489988)
Also, for the record, I've not thought Lucene was slow for any use cases I've needed it for. I've seen benchmarks showing other tech faster in some cases, but never needed that performance.
Re:Lucene's FuzzyQuery is 100 times faster in 4.0 by timr on Wednesday April 27, 2011 @03:38PM (#2490764)
"Java is fast for long-running applications. Once the JIT kicks in, important code is natively compiled. This is why Java is big in the server space, and not so much for desktop applications."

Java is a pain in the server space. The memory footprint is bloated, so cache locality tends to suck; it's prone to nasty garbage-collection pauses (hello, latency spikes!); and now instead of one process that can crash or go funky (your code), now you've got two (the JVM and your code). And that's just the tip of the iceberg.

I honestly don't know why people started writing server software in Java, but I wish they would stop (I'm looking at you, Apache project). There's absolutely nothing that Java is "good" at that couldn't be done better in other languages...except for allowing teams of mediocre developers to write frameworks for big software bureaucracies.

Re:Lucene's FuzzyQuery is 100 times faster in 4.0 by jbooth on Wednesday April 27, 2011 @10:47AM (#2489650)
Lucene has basically always been really fast for just-plain-indexing-and-search. Certain additional features are pretty expensive to do the obvious way and came in as "it works" first and "it's fast" later. Reading the blog entry, this seems to be the case for fuzzy searches. One thing to take note of is that you can't just change your index structure for one feature, that might make other features slower and not worth it.
Re:Lucene's FuzzyQuery is 100 times faster in 4.0 by mgkimsal on Wednesday April 27, 2011 @10:52AM (#2489663)
One thing I'd forgot to mention, and is probably applicable in this case, is that 'non-standard' approaches may in fact not be computationally feasibly when a project first starts out. Precomputing loads of tables of data makes sense when you're on 3ghz processors, but probably not if you're on 200mhz CPUs, for example.
Re:Lucene's FuzzyQuery is 100 times faster in 4.0 by wmf on Wednesday April 27, 2011 @02:22PM (#2490498)
Yeah, I remember when a new version of Android came out that was 4x faster and I felt like I was the only one who interpreted that to mean that most of the CPU cycles were completely wasted by the previous versions. The same thing applies to OS X, where every version has been faster on the same hardware.

People talk about software performance, but another way to look at things is that hardware provides performance and software (especially OS/middleware) only provides overhead. So software doesn't really get faster, just less wasteful.

Re:Lucene's FuzzyQuery is 100 times faster in 4.0 by mgkimsal on Wednesday April 27, 2011 @03:26PM (#2490724)
Thank you! :)