Perf Work

1 view
Skip to first unread message

Christoph Rüegg

unread,
Apr 25, 2009, 5:09:16 PM4/25/09
to docu
Just FYI, I ran docu through dotTrace (against the Math.NET Iridium
assembly) and noticed that more than half of the time was spent in
Type.FullName as part of the Identifier.GetMethodParameters method.
Naturally I tried to build and reuse a simple lookup table instead,
what resulted in a speedup of around 2.5 - 3:

Before:
Type.FullName calls: 12'539'946
Identifier.GetMethodParameters time spent: ~ 52'000 ms (76%)
Identifier.GetMethodParameters calls: 1375
Identifier.GetMethodParameters average time: ~ 38 ms

After:
Type.FullName calls: 7'563
Identifier.GetMethodParameters time spent: ~ 1'250 ms (5%)
Identifier.GetMethodParameters calls: 1375
Identifier.GetMethodParameters average time: ~ 0.915 ms

Commit: c337bbc67dd9da999b7551f26e2c1ecfb049b418 (cdrnet/docu,
performance branch)

I'll continue to look for easy-to-fix/workaround performance issues,
but won't go deep for now...

Thanks for the great work,
Chris

James Gregory

unread,
Apr 27, 2009, 4:28:41 AM4/27/09
to docu-...@googlegroups.com
Hey Chris,

Great work! I had run dotTrace myself and seen the same problem, but I hadn't had time to do anything about it.

I think there are a few places that could benefit from some parallelisation, but they may require some architectural changes. Particularly the phases of parsing the xml and assembly are both independent, but currently run in sequence; these could quite reasonably be run side-by-side.

Anyway, keep up the good work!

James
Reply all
Reply to author
Forward
0 new messages