The use of sync callbacks seems to fix the performance problem in Firefox.