Skip to content
This repository has been archived by the owner on Sep 7, 2020. It is now read-only.

Performance issue after upgrade to 0.8.0 #187

Closed
thangngoc89 opened this issue Feb 24, 2016 · 7 comments
Closed

Performance issue after upgrade to 0.8.0 #187

thangngoc89 opened this issue Feb 24, 2016 · 7 comments

Comments

@thangngoc89
Copy link
Contributor

I noticed that generating html static file tooks too long after upgrading to 0.8.0.

Here is some information from Travis build of statinamic master branch

0.7.1: 197ms
0.8.0: 27s

Maybe because of these LoC ?

  const {
    layouts,
    metadata,
    routes,
  } = importExports(exports)

(https://github.com/MoOx/statinamic/blob/next/src%2Fstatic%2Fto-html%2Furl-as-html.js#L25-L29)

@MoOx
Copy link
Owner

MoOx commented Feb 24, 2016

Should not be the issue since when you require() as same file twice, node use its cache.
No idea for now.

@thangngoc89
Copy link
Contributor Author

I can confirm that above LoC is the problem. Revert that change and build time back to 150ms (on my laptop)

@MoOx
Copy link
Owner

MoOx commented Feb 24, 2016

You cannot just revert those lines. I introduced this to fix a lack of dev server "freshness".

@thangngoc89
Copy link
Contributor Author

@MoOx Yes. I know. I send a PR to fix it in the first place.

@thangngoc89
Copy link
Contributor Author

Sorry for the troubles. After doing some benchmark, there is no different at all.

Just debug is giving false information

  • 0.7.1: layouts, metadata, routes was processed in the first step, those extra seconds are counted in this step
  • 0.8.0: layouts, metadata, routes was processed after webpack build so debug will show it hrer

@thangngoc89
Copy link
Contributor Author

@MoOx what's wrong with this ?

@MoOx
Copy link
Owner

MoOx commented Mar 21, 2016

Sorry I mean #301

MoOx added a commit that referenced this issue Sep 26, 2017
This plugin now use [unified](http://unifiedjs.github.io) directly instead of [remark](https://github.com/wooorm/remark) so we can mix remark with [rehype](https://github.com/wooorm/rehype) to allow custom markup.
This will open up usage of custom react components when rendering markdown tree with a custom mapping.

Closes [#187](#817) Closes [#1098](#1098)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants