Forum Home
Welcome to the new
A message board system written in pure python using the web2py framework.
pyForum is sporting a new, completely re-designed interface and back-end
Download pyForum from
Optimisation of 1st run prepopulate
By: francisboon
Rank: Starfleet Ensign
Postings: 7
From: Unknown
Posted: Mon, 21 November, 2011 - 07:42 AM

I see that models/ has a bunch of checks to ensure that the relevant startup data is loaded into the database:

(1) Doing a select(, limitby=(0, 1)).first() is faster than a .count()

(2) Better to wrap all these behind a single check for a value which can be set at the top of the file? (like 'migrate')

You can see how I do this here:


This topic contains no responses.

System Announcements
Latest Posts
Support pyForum