]> git.mjollnir.org Git - moodle.git/commit
MDL-9506
authornicolasconnault <nicolasconnault>
Thu, 10 May 2007 08:08:43 +0000 (08:08 +0000)
committernicolasconnault <nicolasconnault>
Thu, 10 May 2007 08:08:43 +0000 (08:08 +0000)
commit8f4a626d5cee325e3f3d31b8e622f498cd9acf57
tree3aca59b803a4327ab5b8303db9a360d5f8de2c10
parentad9757c53e3329c5eec17af0f0269d657cd23761
MDL-9506
grade_grades_raw
    added grade_item object
    added load_grade_item()
    added call to grade_item->flag_for_update() when object is inserted, deleted or updated
grade_grades_final
    added grade_item object
    added load_grade_item()
grade_grades_text
    added grade_item object
    added load_grade_item()
grade_item
    added qualifies_for_update()
    added call to grade_category->flag_for_update() when object is inserted, deleted or updated (only when qualifies_for_update() is true)

However since I have made this last set of changes, the unit tests are performing extremely slow, and several of them fail. I suspect that there is a serious performance issue involved in using objects too heavily, instead of performing more SQL queries, especially when updates are concerned. Often a complete object is SELECTed before it is amended in an object form then UPDATEd.

In the next iteration I will look at this seriously, and put together some tests with thousands of users and many grade_items, to see how well the API responds.
lib/grade/grade_category.php
lib/grade/grade_grades_final.php
lib/grade/grade_grades_raw.php
lib/grade/grade_grades_text.php
lib/grade/grade_item.php
lib/simpletest/grade/simpletest/testgradecategory.php
lib/simpletest/grade/simpletest/testgradefinal.php
lib/simpletest/grade/simpletest/testgradeitem.php
lib/simpletest/grade/simpletest/testgraderaw.php
lib/simpletest/grade/simpletest/testgradetext.php
lib/simpletest/testgradelib.php