As I’ve ported ClockingIT to use Sphinx/Ultrasphinx instead of ferret/acts_as_ferret, I figured I’d give jruby a shot to see how it compared to MRI when running ClockingIT. I’ve wanted to do this for a long time, but the reliance on ferret/acts_as_ferret for search has made it impossible to do until now, as native C extensions don’t work with jruby.

The test machine is an Intel Core2 Quad @ 2.4Ghz with 8GB memory and SATA2 Raid5 disks running ArchLinux x86_64 and a 2.6.27 linux kernel. The benchmark consists of 23 different web pages from ClockingIT, requested 100 times each, using real data from my own hosted instance.

MRI 1.8.7 p72 / mysql / mongrel

Initial run: 6m46.396s
 Second run: 6m43.450s

jruby 1.1.5 –server / jdbcmysql / mongrel

Initial run: 6m8.400s
 Second run: 5m20.322s

jruby 1.1.6RC1 –server / jdbcmysql / mongrel

Initial run: 5m50.992s
 Second run: 4m59.823s

MRI 1.8.7 p72 / postgresql / mongrel

Initial run: 7m21.408s
 Second run: 7m17.608s

jruby 1.1.5 –server / jdbcpostgresql / mongrel

Initial run: 6m37.021s
 Second run: 5m55.811s

The PostgreSQL is mostly just there for comparison, and is not nearly as tweaked or optimized as the MySQL version, but it contains the same data.

WYSIWYG Wiki Editor

July 27, 2008

I’ve integrated TinyMCE when editing Wiki pages and Notes. This means that you don’t have to muck about with Textile/Markdown to add formatting to your pages, as a lot of people have problems understanding how that works and getting the formatting right.

I’ve also added support for wrapping code and such in <pre></pre> which turns off all WikiWords, autolinkification and task linking.

I’ve been struggling a bit with a case of

marshal data too short

for one of my users. It happened out of the blue, and I was stumped as to how it could happen, as I only save a couple of ID’s in the sessions and never any objects.

Turns out I forgot something which is pretty obvious, really.

flash['notice'] = "#{link_to_task_with_tooltip} successfully saved"

As the tooltip contains the full task description, what would happen if someone entered a massive description (~65kb) and saved the task?

It would case the session data to get truncated on save, and end up impossible to restore on the next request.

Also, the exception when this happens doesn’t really include any useful information (like which session it was unable to restore) so I thought this was a way more common problem than it really was. Turns out this problem only affected two users, but they both kept trying and trying and it looked like I had this problem all over the place.

Fix coming up. :-)

There’s been some changes to the GANTT view, and you can now drag a task-bar or milestone indicator to change the due dates.

All changes done to the chart are kept temporary, until you either save the new schedule or revert back to the last saved state. Saving the schedule creates Acitivity Log entries, and send out email notifications if you want and have those enabled.

Editing a task outside of the GANTT view will reset the temporary data to the new values, if they change.

GANTT dependencies

June 29, 2008

I’ve had a go at making the ajax GANTT chart respect dependencies, which turned out to be quite tricky as this is happening on a webpage, and I can’t really spend much processor-time laying it all out.

It seems to work just fine on my test-cases, but I’m sure I haven’t thought of everything. :-)

Work Log logging

June 24, 2008

I’ve added a small auto-saving text box to the right menu, which pops up whenever you’re working on something. Whatever you enter in there will be logged to your current work log, so it’s even easier to remember what you’ve done.


June 23, 2008

When I added translations to ClockingIT I went with a really simple system where all the strings to be translated are defined along with their translations in a file, with one file per language. This worked great for initially translating the whole thing to a new language, but it’s broken down as I’ve added more and more languages, changed strings, and added new strings.

To get some new text translated these days, I’ve had to add the strings to 13 different files, and contact 13 different people to do update the translations, some of which don’t have Git and need to have the complete file emailed back and forth.

No more! New strings are now automatically added to a table in the database, and I’ve added a simple form to update the translation of your language. I’ve also added a couple of rake tasks to dump/restore this information to/from the normal language files so you have a backup in case someone makes a mistake.


Get every new post delivered to your Inbox.