Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JS and CSS minification should run on a separate thread #1328

Closed
julianlam opened this issue Apr 3, 2014 · 6 comments
Closed

JS and CSS minification should run on a separate thread #1328

julianlam opened this issue Apr 3, 2014 · 6 comments
Assignees
Milestone

Comments

@julianlam
Copy link
Member

The js and CSS minification methods should run on a separate nodejs process. This would free up the system in the event that assets need to be recompiled.

Make sure the process has a priority of 20, though I'm not sure how much this would help.

@julianlam julianlam added this to the 0.4.1 milestone Apr 3, 2014
@julianlam julianlam self-assigned this Apr 3, 2014
@akhoury
Copy link
Member

akhoury commented Apr 3, 2014

but it doesn't matter, you would have to wait for the minification to be done before the NodeBB is ready for use.

EDIT: no?

@julianlam
Copy link
Member Author

Yes, though 2 reasons :

  1. Restarts take too bloody long on production mode
  2. This possibly opens up the capability of not having to restart NodeBB on theme or plugin changes

@mattijle
Copy link
Contributor

mattijle commented Apr 3, 2014

Yeah, about time. Anything to shorten the restart times is great.

@preeefix
Copy link
Contributor

preeefix commented Apr 3, 2014

I'm in approval, how long would this take?

Also why not add hashing and caching? So that NodeBB can just compare with the file and not have to re-minify it?

@julianlam
Copy link
Member Author

For bonus points, NodeBB could begin serving a stub "site_title is loading" page, though this isn't really necessary at this point.

NodeBB used to save the file to disk, although we were running into issues where the hashing process was not detecting all cases when a file changed, and was thus not reminifying the file.

We opted for a minify on app start process, but that has its own problems as well :-)

@preeefix
Copy link
Contributor

preeefix commented Apr 3, 2014

If you can borrow some code from nodemon you could implement an sub app that refreshes with the latest template... No need to even restart, it just happens.

julianlam added a commit that referenced this issue Apr 3, 2014
@psychobunny psychobunny modified the milestones: 0.4.1, 0.4.2 Apr 7, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants