Web Paint-by-Number Forum
Topic #383: A Slight Restructuring of Webpbn
By Jan Wolter (jan)

#1: Jan Wolter (jan) on May 10, 2013

In my continued quest for ways to speed up webpbn without completely redesigning it, I'm going to make a big little change to the way the site works.

Currently when you enter webpbn you see the "Home" page which contains a list of puzzles that you haven't solved yet. This is actually a fairly expensive page to generate - we have to search all the puzzles and match that list against the list of puzzles that you have solved. So these days you often have to wait a while before the page actually appears.

Which is kind of an issue because sometimes you don't even want to see the page. Maybe you plan to go straight to the "random puzzle" page or the "forum" page. You might even click that button before the puzzle list loads.

So if I'm going to speed up the site, it seems like a good idea to stop running expensive queries that nobody asked for and nobody wants to see the results from. Rocket science, ain't it?

So what I plan to do:

The exact nature of the new home page is still in the works. It will be a semi-static page. Everyone will see the same page, and it will change only occasionally. It will mostly contain lists of puzzles, but it will not be a personalized list. It may very likely contain puzzles that you have already solved.

It will probably contain a list of "featured" puzzles, which will simply be random selections from the current "Best Puzzles" tab, that will change every day. There will be a list of about a dozen of the most recently posted puzzles. Probably there will be some sort of list of forum topics that have had a lot of recent activity.

The page will probably be updated hourly, so if you post a new puzzle, it might take an hour before it appears on the home page. Of course, it will appear immediately on the puzzle list page, as it always has.

I also intend to make this page available to non-logged-in users.

#2: Wombat (wombatilim) on May 13, 2013
Would it be possible to have an option for loading page? For example, my first stop is usually forums. For some people, I imagine starting at the saved puzzles list might be useful.
#3: Jan Wolter (jan) on May 20, 2013
Maybe. That adds cost to the first access again though, since I have to look up your start page option setting in the database. If I make the default start page something that is lightweight and fast loading, then it is easy enough for people to just click on the button they want if they don't want that.
#4: David Bouldin (dbouldin) on May 20, 2013
...and if somebody wants to start on a particular page each time, they can simply make their webpbn bookmark point there.
#5: Joe (infrapinklizzard) on May 20, 2013
Even without the new front page, the site has been very speedy for the last couple days!
#6: Minnie Fuerstnau (mini) on May 22, 2013
Thank you very much for all of the work you have put into this site for so many years. It has given me untold hours of enjoyment, and now that it is faster the occasional frustration should be gone.

Thanks again for continuing to maintain and update this for us!
#7: Jan Wolter (jan) on May 22, 2013
The new front page is now up. I'm likely to do some more fine tuning on it though.

"Featured Puzzles" are just randomly selected from the old "Best Puzzles" list, two at each difficulty level. They change once a day.

"Most Recent Puzzles" are just the last 20 puzzles posted, updated hourly.

"Active Discussions" are the forum threads which have had the most responses posted in the last 48 hours, updated hourly. That includes both general discussion threads (like this one) and puzzle discussion threads.

I don't think the speed battle has been won. For one thing, as the site speeds up, it is likely to attract more users until it slows down again, but I'm continuing to pursue a variety of modifications to improve its performance.
#8: Kristen Vognild (kristen) on May 22, 2013
There are now two "Find Puzzles" tabs. :)
#9: Jan Wolter (jan) on May 22, 2013
Oops. Fixed.

I wish all the bugs were so easy.
#10: Kristen Vognild (Kristen) on May 23, 2013
The *only* problem I have with the new homepage is that it shows puzzles I have already solved, with no mark to indicate the ones I have solved. Would that just slow down the site?
#11: Jan Wolter (jan) on May 23, 2013
Yup. The new home page is generated once an hour and mostly just stored in a file and very little customization is done for each user (Mostly I just inject your session ID into all the URLs). That means no database accesses to display it. I thought about checking off the puzzles you have already solved, but that would have required a database access.

So obviously this is no substitute for the old home page ... but the old home page is still available, and you should not hesitate to use it if you want it. The concept here was to stop doing expensive queries that the user may or may not even want, not to keep people from getting the information they want.

I'm finding I kind of like the "Active Discussions" list. I want to improve that by including more information about the puzzle. I might also add on option to display something similar, but more customized to the individual user, on the "Forum" page.
#12: Joe (infrapinklizzard) on May 23, 2013
One thing that I've been thinking would be nice is the ability to flag a thread as interesting. This would be independent of the solved puzzle flag, so you could follow conversations in puzzles you have not solved (or marked solved).
#13: Al LaPointe (kancamagus) on May 23, 2013
Thank you very much for the speed improvement! With so fewer queries, the rest of the site benefits as well.

Goto next topic

You must register and log in to be able to participate in this discussion.