You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by benkeen <gi...@git.apache.org> on 2015/06/12 01:06:28 UTC
[GitHub] couchdb-fauxton pull request: Gruntfile watch task performance imp...
GitHub user benkeen opened a pull request:
https://github.com/apache/couchdb-fauxton/pull/460
Gruntfile watch task performance improvements
As Fauxton's grown the watch tasks which execute during development
have been taking increasingly longer to run. The old code re-ran
various tasks for every file: JSX generation, copying remote files
over to Fauxton, jshint and stylechecks. When working on a Fauxton
wrapper (like the Dash) often when you save a file and refresh
the page, the various watcher tasks haven't finished executing
so you get errors in the browser. Worse, sometimes the process chokes
and you need to restart the server.
This updated version changes the behavior for JS and JSX files. Now:
- JSX files found outside of the Fauxton folder are compiled
directly into the Fauxton folder.
- JSHint and stylecheck are ran on the changed files only.
- booting up Fauxton (`grunt dev`) behaves just as before and does
a clean slate pulling in the latest content
- JSX module cache disabled. Since it's only ran during the initial
bootup and only takes a fraction of second, disabling it ensures
that on restarting the server everything is completely regenerated
afresh.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/benkeen/couchdb-fauxton gruntfile-watch-task-performance
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/couchdb-fauxton/pull/460.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #460
----
commit 1ff84a2fbc6aed47ec03f9a23474ddab43eba8c7
Author: Ben Keen <be...@gmail.com>
Date: 2015-06-11T23:00:41Z
Gruntfile watch task performance improvements
As Fauxton's grown the watch tasks which execute during development
have been taking increasingly longer to run. The old code re-ran
various tasks for every file: JSX generation, copying remote files
over to Fauxton, jshint and stylechecks. When working on a Fauxton
wrapper (like the Dash) often when you save a file and refresh
the page, the various watcher tasks haven't finished executing
so you get errors in the browser. Worse, sometimes the process chokes
and you need to restart the server.
This updated version changes the behavior for JS and JSX files. Now:
- JSX files found outside of the Fauxton folder are compiled
directly into the Fauxton folder.
- JSHint and stylecheck are ran on the changed files only.
- booting up Fauxton (`grunt dev`) behaves just as before and does
a clean slate pulling in the latest content
- JSX module cache disabled. Since it's only ran during the initial
bootup and only takes a fraction of second, disabling it ensures
that on restarting the server everything is completely regenerated
afresh.
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] couchdb-fauxton pull request: Gruntfile watch task performance imp...
Posted by michellephung <gi...@git.apache.org>.
Github user michellephung commented on the pull request:
https://github.com/apache/couchdb-fauxton/pull/460#issuecomment-112030199
this is cool. I keep getting this error though:
`Warning: Command failed: /bin/sh: jsxcs: command not found`,
+1 otherwise
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] couchdb-fauxton pull request: Gruntfile watch task performance imp...
Posted by benkeen <gi...@git.apache.org>.
Github user benkeen commented on the pull request:
https://github.com/apache/couchdb-fauxton/pull/460#issuecomment-113269936
Thanks, @michellephung! I'll ask @robertkowalski to take a glance at this when he gets back before merging, as well.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] couchdb-fauxton pull request: Gruntfile watch task performance imp...
Posted by benkeen <gi...@git.apache.org>.
Github user benkeen commented on the pull request:
https://github.com/apache/couchdb-fauxton/pull/460#issuecomment-112586698
That's really weird... it's just using the same dependencies as before. The only difference is that it's now running them directly via a shell command rather than via an npm command, but that shouldn't cause problems. Let's debug this tomorrow if you have time.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] couchdb-fauxton pull request: Gruntfile watch task performance imp...
Posted by michellephung <gi...@git.apache.org>.
Github user michellephung commented on the pull request:
https://github.com/apache/couchdb-fauxton/pull/460#issuecomment-114561147
@robertkowalski bump
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] couchdb-fauxton pull request: Gruntfile watch task performance imp...
Posted by robertkowalski <gi...@git.apache.org>.
Github user robertkowalski commented on the pull request:
https://github.com/apache/couchdb-fauxton/pull/460#issuecomment-114807781
wow this is exciting!
+1
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] couchdb-fauxton pull request: Gruntfile watch task performance imp...
Posted by benkeen <gi...@git.apache.org>.
Github user benkeen closed the pull request at:
https://github.com/apache/couchdb-fauxton/pull/460
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] couchdb-fauxton pull request: Gruntfile watch task performance imp...
Posted by benkeen <gi...@git.apache.org>.
Github user benkeen commented on the pull request:
https://github.com/apache/couchdb-fauxton/pull/460#issuecomment-114225041
Welcome back, @robertkowalski. Now you're back, I can start bugging you to review stuff again. You're welcome!
Mind taking a glance at this? It runs *far* faster now. This ticket modifies the watcher task to only recompile changed js/jsx files instead of everything each time.
The one oddity you may notice is that when editing a JSX file, it appears to compile the file multiple times, but it actually doesn't: it recompiles all JSX files in the folder of the changes files (e.g. the tests). This is because the command-line utility for compiling the JSX only allows targeting a folder, not a single file: so any other JSX files (tests, for example) are compiled as well. Despite that, it still runs far faster.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] couchdb-fauxton pull request: Gruntfile watch task performance imp...
Posted by benkeen <gi...@git.apache.org>.
Github user benkeen commented on the pull request:
https://github.com/apache/couchdb-fauxton/pull/460#issuecomment-114912280
Thanks! Merged as 4799333
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] couchdb-fauxton pull request: Gruntfile watch task performance imp...
Posted by robertkowalski <gi...@git.apache.org>.
Github user robertkowalski commented on the pull request:
https://github.com/apache/couchdb-fauxton/pull/460#issuecomment-114807827
good work ben, really nice stuff!
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] couchdb-fauxton pull request: Gruntfile watch task performance imp...
Posted by michellephung <gi...@git.apache.org>.
Github user michellephung commented on the pull request:
https://github.com/apache/couchdb-fauxton/pull/460#issuecomment-113269488
+1, all fixed.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---