Moodle 1.9.9 on a new good spec dedicated server with 4Gb RAM.
We have to bulk upload a lot of users on an ongoing basis but we are finding uploaduser.php is a very slow way to do this.
For example, a typical file for us has 1000 rows of data to add 333 new users. The 3:1 ratio is because each user is typically a member of 3 groups (classes) and we get a line of data for each of these groups. On each line, the user is enroled on 3 courses, and has the same role (learner or teacher) for all 3.
Importing that kind of file is taking about 80 minutes, and we suspect it is getting slower as the number of users in the system increases.
Using the MySQL runtime info to identify possible problems we have been able to tweak things like buffers, table cache etc to get most of the "high" numbers there into acceptable ranges but it hasnt changed the performance of uploaduser.
The key numbers that we cannot address with configuration changes are those that say things like they happen because "You probably have a lot of queries that require MySQL to scan whole tables or you have joins that don't use keys properly" and "your tables are not properly indexed or that your queries are not written to take advantage of the indexes you have".
We have added a couple of indexes on fields that seem to be used in this script but it does seem that the things that should be indexed largely are already - and it hasnt improved performance.
Summary is that we suspect the code for this process is not as efficient as it should be, but logging queries that dont use indexes shows possibly responsible code that isn't in the uploaduser script itself but presumably is being pulled in from libraries etc. That is, it's beyond our skills to safely change!
1) is our experience typical?
2) can anyone suggest how to improve this?
3) will 2.0 be any better? (tried to install to test but we are currently blocked by an installer bug on the latest build)
4) last resort - how realistic would it be to get (pay) someone to write/rewrite an optimised version of this script that isnt dependent on other nested generations of moodle code?
... or any other suggestions/pointers gratefully received!