The lesson this week has got to be “Profiling is a Good Thing”. While working on the new Elgg community site this week, it quickly became clear that the way the River code was written was horribly inefficient.
So, I had to optimise it.
Unfortunately this necessitated a schema change to the system log (a good test for the Elgg update scripts). It also required some changes to the way the river views are constructed.
The details of these changes are documented over here. Turns out to be a bit of a blessing in disguise; letting us speed up the river while at the same time increasing the number of events a plugin can hook into as well as standardising the views hierarchy.
The down side is that after the upgrade site rivers will appear to be blank – this is because while the system log is still there, the format of the log and the way the river code hooks into it has changed.
The change also means that plugins which hook into the river will also need to modify their views hierarchy slightly.