docfy
docfy copied to clipboard
Thoughts on bundling raw markdown and shipping a compiler in development?
I'm noticing that with enough documentation, initial build can be > 3 minutes, and rebuilds > 20s.
What if, during development (or maybe always?), we ship the compiler, and dynamically load the markdown files as the pages are visited. During build, the only data kept in the main bundle would be the frontmatter info / references to the uncompiled markdown files.
Is the build time due to Ember or Docfy specifically? I would probably guess this is because of Ember build pipeline. Probably using Embroider + Vite would improve the experience (I think). Embroider support is also not fully fleshed out...
Docfy does need to do a partial build. Today, we build everything at every change. This is because of the nature of linking between files, so we should create a caching layer.
Is the build time due to Ember or Docfy specifically?
How do I find out where time is spent during build?
Today initial build is ~ 300,000ms
might be useful: https://github.com/empress/broccoli-static-site-json
Today, initial build is ~ 530s
oh I almost have the same issue open twice, related comment: https://github.com/josemarluedke/docfy/issues/85#issuecomment-931133658
as I'm digging in to this, it seems it would be easier to, instead of having to upgrade a bunch of things for ember-auto-import@v2 compatibility, to not use the docfy-plugin that dumps the docs to components, and then override the docfy service and docfy-output component to handle async (fetching + rendering). New issue incoming: https://github.com/josemarluedke/docfy/issues/113