Archives for the month of: June, 2012

Wow its been a month already, time flies!

This week I abstracted (read as separated) the DB layout for SMW. This will make it easier to add new DI types in the future and modify the existing ones. From here follows a series of update to the DB schema.

Till now, as new DI types were added the code was modified to support them *somehow* by using similar naming of fields for most DI types and using some unnecessary fields in many places (Boolean field uses two columns but one is enough and  Geo uses three fields where again one is enough). But now that the DB is abstracted at each DI layer, DB access could be easily modified to enhance performance  for each DI separately and  also merge the DI type String with Blob (will elaborate on this more in future posts).

All the changes to SMW as part of my GSoC project are done on a separate branch ‘storerewrite’. You can see my changes on Gerrit,n,z

This week I looked at one of the performance issue that affects each and every SMW installation on every page write. Yes, every time a user edits a page and saves it back a lot is done unnecessarily.
Every time SMW goes through all of the text, deletes all the data it had for that page and rewrites the DB with the new data you entered; but what if you only fixed a small typo you had just made? or added new text that has no semantic data associated?? SMW should wisely update your DB instead of blindly doing it tasks. So now we have a hash based approach where we verify if something is new by comparing it with the old stuff’s hash and only update the DB when some Semantic Data changed. This results in very few queries on a page edit. Currently I am working on  a branch of SMW and this change is visible at
When all this stuff is merged with the master branch of SMW and released you can upgrade it and say Yay! 😉

This week I did mostly splitting of the store code, this was essential for further work to go on smoothly. Not much to explain here 😛

Here’s the link to the change