docfy icon indicating copy to clipboard operation
docfy copied to clipboard

Thoughts on bundling raw markdown and shipping a compiler in development?

Open NullVoxPopuli opened this issue 3 years ago • 7 comments

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.

NullVoxPopuli avatar May 07 '21 14:05 NullVoxPopuli

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.

josemarluedke avatar May 07 '21 18:05 josemarluedke

Is the build time due to Ember or Docfy specifically?

How do I find out where time is spent during build?

NullVoxPopuli avatar May 07 '21 18:05 NullVoxPopuli

Today initial build is ~ 300,000ms

NullVoxPopuli avatar May 10 '21 14:05 NullVoxPopuli

might be useful: https://github.com/empress/broccoli-static-site-json

NullVoxPopuli avatar Sep 25 '21 21:09 NullVoxPopuli

Today, initial build is ~ 530s

NullVoxPopuli avatar Sep 28 '21 12:09 NullVoxPopuli

oh I almost have the same issue open twice, related comment: https://github.com/josemarluedke/docfy/issues/85#issuecomment-931133658

NullVoxPopuli avatar Sep 30 '21 09:09 NullVoxPopuli

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

NullVoxPopuli avatar Sep 30 '21 10:09 NullVoxPopuli