Often when I load a page I get the main screen quite quickly, but it takes another 20-30 seconds for the sidebar to load. Not sure if it's doing hundreds of sequential database calls or something.
Some of the boxes are pretty intensive. If you've got an enourmous hotlist that can slow it down a bit (but not that much). Much of it is cached as well, but all the caching code was custom written just for that box. There is no common code for caching something.
Example. If a box wants to know the title of a story, it will often make a database call to get the story title. Often another box will want to know the same thing, so it will do the same. Sometimes the same box will make 3 databases calls for the same story, to get three different bits of information.
A lack of standard routines to get that stuff is the cause really. It needs some global routines to fetch and cache story and comment stuff. Even just caching it for that page view would save a lot of redundent database calls.
There is also a bug in the story update code which people who have "edit my own story" can exploit to edit any story on the site. It's very difficult to fix because of the spagetti code of the story update section. It's very messy in places. That's why only cabal members can edit their own stories right now, because most of them can be trusted to not fuck the site up.-- smart, pretty, sane. pick two - georgeha[ Parent ]
And thanks for doing a SWFC -- I'm not sure this one will take off and, in any case, it was just a lark from channel.... "There will be time, there will be time / To prepare a face to meet the faces that you meet." -- Eliot[ Parent ]