From: Alexis Laferrière Date: Thu, 28 Aug 2014 16:07:07 +0000 (-0400) Subject: nitdoc: cache `concern_rank` X-Git-Tag: v0.6.8~3^2 X-Git-Url: http://nitlanguage.org nitdoc: cache `concern_rank` Improve performance of nitdoc by 60 times in some cases! Signed-off-by: Alexis Laferrière --- diff --git a/src/model_utils.nit b/src/model_utils.nit index bc8d2cb..51c643c 100644 --- a/src/model_utils.nit +++ b/src/model_utils.nit @@ -34,7 +34,7 @@ redef class MConcern end redef class MProject - redef fun concern_rank do + redef fun concern_rank is cached do var max = 0 for mgroup in mgroups do var mmax = mgroup.concern_rank @@ -87,7 +87,7 @@ redef class MGroup return res end - redef fun concern_rank do + redef fun concern_rank is cached do var max = 0 for mmodule in collect_mmodules do var mmax = mmodule.concern_rank @@ -201,7 +201,7 @@ redef class MModule return res end - redef fun concern_rank do + redef fun concern_rank is cached do var max = 0 for p in in_importation.direct_greaters do var pmax = p.concern_rank