Familypedia
Advertisement
Forums: Index > Watercooler > SMW is way faster than info pages


To give you an idea of what makes things slow, if you use your browser to look at the source for a page (firefox View.page source- IE has the same thing), then search for "NewPP" you will find some interesting numbers that measure how hard a page makes the wikia servers work. The last one is most important: expensive functions. The maximum value is 500 but oftentimes the engine will let you go 50 over.

I have been noticing that some of our high value articles have been slow, and so I took a look at reducing these numbers. Some preliminary results below. SMW children is the new {{showfacts children}} templates that will replace {{showinfo children}}. On articles with large numbers of children, this consumes a lot of CPU time. Also as can be seen, the Descendants calculation was also consuming a great deal of processing time, so I converted it to use only SMW functions.

Article original after smw children
upgrade
after smw descendants
upgrade
Charlemagne (747-814) 546 279 121
Charles II of England (1630-1685) 399 274 174

Here is a breakdown of where all the processing is going- counting backwards.

After Smw children upgrade* 274
After Smw descendants* 174 Old descendants processing cost: 100
After removing infobox 148 Infobox cost 26
After removing autocats from info categories* 87 autocats cost 61
After removing facts from info 46 cost facts from info 41
After removing Inbreeding test 25 inbreeding cost 19

Starred items are permanent savings, and these costs were fairly constant whether the article was big or small. -~ Phlox 00:07, 13 June 2009 (UTC)

Good. Not everyone has 20 children, but it must be good even for fewer children. You will be sure to tell us when SMW is really ready to replace info pages? — Robin Patterson (Talk) 00:46, 13 June 2009 (UTC)
There were some dramatic savings on some of the very busy kings, but the huge huge savings are actually for normal articles. Just to give an idea, a fairly rich article at wikipedia like wikipedia:New York City has a total expensive parser count of 38. At familypedia, even a simple article like Agnes von Gutschmid (1842-1924) that Fred just uploaded using standard info pages costed: 108. After switching his article to use some of the SMW templates completed thus far, the cost came back down to 57. The cost would be 21 were it not for the "facts from info template" that is temporary scaffolding allowing both systems to co-exist. So we are looking at a factor of 5 speed improvement just for minimal articles. That means our cache refresh is 5 times faster, and we shall tend to experience less of the prolonged delays on loading or saving articles.
To every Familypedian: the moral of the story is to remember to look at the NewPP number every so often. If you see a figure up around 200, something is very wrong. Start chopping out templates, then do a preview, then display the html source and check the NewPP number. Eventually you will stumble across the stinker(s) that are sucking up all the time. If you see a big number like 250 and can't figure out where the time is going, post a help desk forum note, or tell an admin.
Robin, it would be very hard to forget to let you know when the smw stuff is ready. Those two Maori chaps you sent over are very friendly and all, but I note they become somewhat irritable when my typing slows down... -~ Phlox 01:55, 13 June 2009 (UTC)
Oh my goodness. I just got the handle on info pages and we are changing again? Wonder how long this one will take me.  :-) - William Allen Shade 21:54, 13 June 2009 (UTC)
Will, as I understand it, SMW will be a similar process but easier to use. Individual facts will go into separate boxes on a "form" instead of separate lines of a big edit box, so we will be able to "Tab" to the next one instead of having to aim and click or find the "down" arrow. And the facts are listed at the bottom of a page (as you may have noticed already on many pages, though I hope the order will improve) instead of on a separate page. — Robin Patterson (Talk) 02:37, 14 June 2009 (UTC)
What I and other "followers" would like is an assurance that the info put into info pages will not be wasted but can be converted to SMW facts etc by a bot or similar automatic process. — Robin Patterson (Talk) 02:37, 14 June 2009 (UTC)
Advertisement