Closed joeced closed 6 years ago
Original comment by Mark Mikofski (Bitbucket: bwanamarko, GitHub: Unknown):
fixes #18 speed up reading parsing files
Original comment by Mark Mikofski (Bitbucket: bwanamarko, GitHub: Unknown):
fixes #18 speed up reading parsing files
Originally reported by: Mark Mikofski (Bitbucket: bwanamarko, GitHub: Unknown)
Currently only modules are cached in sys.modules, but classdefs are not.
The way Documenter imports objects is by importing the module, then walks its namespace calling the getter method for each path. EG: for
pkg.mod.cls.attr
it would importpkg
then usepkg.getter('mod')
to getmod
, etc. If a class is encountered it is lexed using Pygments.This means that a class might be lexed multiple times which is time consuming.