When a resourceCommitEdit() is called, the quota calulation loads all the resources in a site into memory to calculate the quota.
This is Ok for small sites with 5 - 10 resources, but with larger sites where 100's of files have been uploaded it causes massive garbage collection and kills performance. It is particually bad with a webdav access where every put however big causes 100 or more getMembers() calls against evey collection in the site. (once per collection, so not cachable)
The Quota calculation should be maintained in 1 place only so it doent have to be re-calculated every time.
It might be worth a look at other filesystems with quota to see how its done there.