I have some pretty serious enhancements to auth/db that I am working on. If you are using 1.7/1.8, have a large number of users, and use the sync script, you might want to try this
The changed auth/db is on a modified 1.8 - if they turn out to be good I'll merge them into 1.9. The branch is here http://git.catalyst.net.nz/gitweb?p=moodle-r2.git;a=shortlog;h=mdl18-local
and you can get the latest version by clicking on the "snapshot" link on that page.
With this code
- the sync should be much faster overall (time it before and after!)
- the sync script execution should take a lot less memory
- it used to fail if you had a large number of users - doesn't anymore
- if your remote db has a "last time this record changed" field that is a unix epoch, or you can synthetize one using a VIEW, set it in the config page, and watch updates get a hell of a lot faster
I am working with 43K user accounts. Both DBs are PostgreSQL 8.1 and both are "local", meaning that I access them via a socket, not ethernet. So I get very low latency.
Initial creation has gone from "does not even finish, dies after 20 minutes" to ~60m. Updates without the timemodified take also about 1hr. If I use the timemodified optimisation, updates take a couple of minutes.
Unfortunately, I don't have a good example where "it works" before. Only have the "after".
NOTE: if you are testing this code don't file bugs in the tracker. Just post here - this is experimental code.
Edit: After the (still slow) initial run, normal daily updates (remove/add/delete a handful of accts) take anywhere between 30 and 60 seconds. I like this