Hey Nischay,

Great you are looking into this. Someone really ought to look at the performance stuff, since there is a lot of low hanging fruit there for SMW :)

>  However, I think this still leads to slow performance because we will still be parsing the page for SMW properties every time.

The parsing in not that expensive, and it only happens on edits, which are far less common then views or re-renders of the page. And you can't really get rid of the parsing, since you need it to know if something changed. I'd just focus on this stuff:

>  Another of my concern is that we perform lots of Delete and Insert Operations on
> the database when editing a page even if nothing has changed, In simple words
> we delete and rewrite all properties on that page.

So yes, this would definitely be something to look at.

Although optimizing that would be nice, I guess the deal performance issues people are having are the many SMW related read queries that happen at page render, or even at page view. One thing that falls into the later category is the Semantic Forms check to see if a page is in a certain namespace to see if it should have a certain "edit with form" tab, which consists out of several queries. Stuff like that could be cached using whatever cache is available to MediaWiki, so that all the needed info can be obtained using a single request to this cache. (Such caches can be stuff such as memcached, but if those are not available, it falls back to the db, still reducing the amount of queries to one.)

You might already have done so, but I suggest you enable the debug toolbar:

$wgDebugToolbar = true;

This allows you to see what queries happened to show the current page to you, as well as their individual and total execution time :)

And you might find other settings relevant to you here (copy of some of the config I use):

https://www.mediawiki.org/wiki/User:Jeroen_De_Dauw/LocalSettings.php

Cheers

--
Jeroen De Dauw
http://www.bn2vs.com
Don't panic. Don't be evil.
--