You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is trying to build the documentation for https://github.com/octokit/openapi-types.ts, the "entry point" is rather large at 1.5MB, I added the following tsconfig.json at the root of the repository in order to enable typedoc:
Running typedoc with --logLevel Verbose prints the following:
Debug: Using TypeScript 4.4.4 from ./node_modules/typescript/lib
Debug: Converting with 1 programs 1 entry points
Debug: Finished getting entry points in 2656ms
Debug: Begin readme search at ./packages/openapi-types
Debug: Finished conversion in 11168ms
Debug: Renderer: Loading highlighter took 752ms
then it pegs a core and doesn't log anything anymore, I ended up killing the process after a bit more than an hour:
4957.74s user 3.66s system 99% cpu 1:22:42.55 total
The text was updated successfully, but these errors were encountered:
Something's definitely very wrong here, conversion should take significantly longer than rendering in almost all cases (unless maybe there's a ridiculous number of code samples to highlight)
Well... the initial "fix" is easy. The culprit is Reflection.getAlias, which had a naive implementation to get a unique alias, resulting in O(n^2), where n is roughly the number of times the key appears in the page (several keys with >2000 for n in this project), to determine one. Replaced that with an O(1) implementation and it renders in 20 seconds on my machine.
The output however is... not great. Because typedoc displays object literal types inline, the operations interface page takes legitimately 60+ seconds to render. I'm not sure how any autogenerated documentation for an interface this large would fare though...
Well... the initial "fix" is easy. The culprit is Reflection.getAlias, which had a naive implementation to get a unique alias, resulting in O(n^2), where n is roughly the number of times the key appears in the page (several keys with >2000 for n in this project), to determine one. Replaced that with an O(1) implementation and it renders in 20 seconds on my machine.
Nice, thanks! I guess it'll be in the next release or something?
The output however is... not great. Because typedoc displays object literal types inline, the operations interface page takes legitimately 60+ seconds to render. I'm not sure how any autogenerated documentation for an interface this large would fare though...
Yeah I wouldn't expect greatness from that large a file: this is documented from an openapi file, which most openapi navigators also choke on IIRC.
This is trying to build the documentation for https://github.com/octokit/openapi-types.ts, the "entry point" is rather large at 1.5MB, I added the following
tsconfig.json
at the root of the repository in order to enable typedoc:Running typedoc with
--logLevel Verbose
prints the following:then it pegs a core and doesn't log anything anymore, I ended up killing the process after a bit more than an hour:
The text was updated successfully, but these errors were encountered: