kohana/userguide — pull request #40 by cbandy (2012-02-21 23:27:02+00:00)
Title: Improve menu performance in API browser

`Kodoc::menu()` created instances of `Kodoc_Class` so it could read the class' `@package` tags to [decide if the class should be shown or not](https://github.com/kohana/userguide/blob/3e9de2620adebe5ded28939ac3f26e0fd8358773/classes/Kohana/Kodoc.php#L80-81).

The `Kodoc_Class` constructor rendered the description, contents and tags to HTML, even though they weren't used.

In these commits, I've moved this rendering into methods called by the view template, saving hundreds of calls to Markdown and other formatting functions. On my local machine, with only a few modules enabled, this allows the API table of contents to render in about half the time.