c2c-oerpscenario team mailing list archive
-
c2c-oerpscenario team
-
Mailing list archive
-
Message #02381
[Bug 511221] Re: trivial speed enhancement in web client?
** Changed in: openobject-client-web
Status: Fix Committed => Fix Released
--
trivial speed enhancement in web client?
https://bugs.launchpad.net/bugs/511221
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to the OpenERP Project Group.
Status in OpenObject Web Client: Fix Released
Bug description:
(web client v5)
The getFormData function is very slow, because it makes use of getElementsByAttribute which is itself extremely slow.
However, I think getFormData is called many times (on every form) when it is not needed.
Please review the following 1-line patch which fixes this:
=== modified file 'openerp/static/javascript/form_state.js'
--- openerp/static/javascript/form_state.js 2010-01-20 20:01:27 +0000
+++ openerp/static/javascript/form_state.js 2010-01-22 15:16:07 +0000
@@ -48,13 +48,14 @@
return;
}
- var fields = getFormData();
//TODO: remove onchange="${onchange}" from all templates and register onChange here
// signal fake onchange events for default value in new record form
id = parseInt(id) || 0;
if (id) return;
+ var fields = getFormData();
+
for(var name in fields) {
var field = getElement(name);
if (field && field.value && getNodeAttribute(field, 'callback')) {