Friday, October 17, 2008

The new templating engine - Preliminary testing

I decided to do some testing of the engine (currently in alpha-stage). At work, I mainly work on content management.

One of our databases has ~5000 (5321) documents (content and categories). They reside in a CMS-type of application.

The current render-engine (using LS/Forall) in the CMS can't deal with that amount of data, when printing the entire structure. After 55 seconds, the rendering stops with no output. Of course, the old engine isn't perfect, and it wasn't built to deal with that amount of data.

When rendering the same markup, with the engine I'm currently working on, it renders in 2.3 seconds, with maximum data being processed in Evaluate (the more data formula can process in a run, the faster it runs). The resulting HTML weighs in at 704KB.

Both tests were done on my 2GHz/2GB RAM laptop.


I thought it would be fast, but this is way better than I expected..

If IBM upped the amount of data formula/evaluate could handle, the engine could probably render the structure in just above one second.

Update: Did a little testing in N8.5/XPages (same markup as in the above tests). As other bloggers has mentioned, XPages are fast. What I really don't like about the current version in Beta2 is that you can't control if Dojo is loaded with the page. As far as I know, there is no way to make a regular webpage without client-side JS (Dojo). I hope they fix that in the final version.

Hopefully they implement some kind of dependency-system. It loads what it needs for the widgets you use, then you can decide on the rest yourself (using checkboxes/etc).


NotesSensei said...

Actually you can very tightly control what the xPages engine is doing. It is JSF after all. You have several possibilities:
- First: you can disable the default rendering (that's a property) on a field by field basis.
- Second: you can create a theme where you specify rendering instructions per control type (even down to control/class).
- Third (not for the faint of heart): mess with the JSF configuration (but that would be system wide)

Tommy Valand said...

So it's that simple.. :P

I'd prefer if the default was no Dojo. Then you add what you need.. A kind of progressive enhancement.