talking improves app performance!

so there we were… watching the system running. we were on the phone, both tailing the app server log file (tail -f ... ) to watch some progress via the age-old, tried and true, logging statements.

the app is doing a lot… running through more than one data source, dynamically generating sql based on meta data and an ontology, dumping it to a triplestore, running rules (invoking some gnarly stuff), culminating in a report.

it was streaming past at a good clip, then you could see it bog down at one point where there was an especially nasty bit of stuff going down for accomplishing a bunch of rule stuff. Then it began moving again at a good clip. There was definitely a visible “rhythm” just watching each part of the system crank through the dozen or so “sections.”

“I’m pretty sure that is where it is doing the ‘saveToStore()’ call.” I thought it was instrumented with some logging… Hmmm. “Wait a minute” my friend said. “Those rule forms… we don’t need to put any of that info into the triplestore since we aren’t displaying any of that info. The triplestore is merely for running SPARQL queries against to get the info out to the browser.”

“Good point!” I said. So he added one line of code to disable calling saveToStore in the case of no SPARQL being specified. That single change resulted in reducing the time by 70%.

Funny what can happen when a couple of people are almost casually talking through and re-thinking the system behavior. thanks lb