SMW has been doing too many unnecessary deletes and inserts into your database lately and this has been worrying you too much? Don’t you worry about it now, I have wrote this little code (will link to it after the code cleanup day) that stops SMW from doing this behavior.

 

So what does this new SMW do? It will now check if something has changed for a page and only rewrite the values if something has really changed (Yes, it is just a small feature but look at some profiling data and you will see the difference it does). Here’s some information I gathered for a page with about 14 property-value tuples :

  1. The newer version did about 14 less queries (including 1 update, 1 insert ,8 delete and remaining select queries).
  2. Memory used by older version 38578056 and by newer version 36118576
  3. Time taken by older version 774.183 and by newer version 753.942

 

Though, I don’t expect property-values to really change much in a wiki page but there will always be new additions, so I think that SMW must also check for each property one-by-one and perform updates rather than rewrite everything.

Will this happen? you will find out in another blog from me, till then have a good day 🙂