~openerp-dev/openobject-server/6.0-case-4492-jma

Viewing all changes in revision 3366.

  • Committer: Olivier Dony
  • Date: 2011-03-15 18:10:19 UTC
  • Revision ID: odo@openerp.com-20110315181019-3pi3j0ojg33wtv3z
[FIX] tools.graph: stop useless recursions to make graph_get() faster

In some cases (depending on the kind of graph being rendered),
the recursive processing could lead to timings of 1 minute per
call to ir.ui.view.graph_get(), even for a relatively small
number of nodes (e.g. 10). By avoiding useless recursions in
head_component() it goes down to a few ms.
This patch also adds str() wrappers for __str__ and printing
of nodes labels, which are not necessarily strings (they
are often integers)

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: