Skip to content

Commit

Permalink
Updated background and notes info
Browse files Browse the repository at this point in the history
  • Loading branch information
localnerve committed Mar 9, 2014
1 parent 98301e6 commit 34a1a35
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion docs/notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ If your content does not show up in a page, you get a timeout error - not a snap
## Caveats

### Each Snapshot is Created in a Separate Process
html-snapshots creates a new process for each page to snapshot, and they run in parallel. I only use this library in a build process on a linux box, so I'm not concerned with creating a lot of processes. However, if you had a site with 1000's of pages, this could become an issue if you are building on a "process-heavy" OS. Futhermore, if you were using html-snapshots live on the server, this could be a deal breaker for a big site.
html-snapshots creates a new process for each page to snapshot, and they run in parallel. ~~I only use this library in a build process on a linux box, so I'm not concerned with creating a lot of processes. However, if you had a site with 1000's of pages, this could become an issue if you are building on a "process-heavy" OS. Futhermore, if you were using html-snapshots live on the server, this could be a deal breaker for a big site.~~
To control the parallel processing load, you can specify the `processLimit` option to limit the size of the process pool. In other words, you can limit the number of pages being processed in parallel at any one time. This is a new feature available in 0.3.x.

### The Default Snapshot Script
The default snapshot script, [snapshotSingle.js](https://github.com/localnerve/html-snapshots/blob/master/lib/phantom/snapshotSingle.js), relies on jQuery to be loaded in every page you snapshot. In other words, _your_ page has to load jQuery. The default snapshot script does not temporarily inject jQuery for you in your pages. Suggestions for fancier snapshot scripts are welcome...
Expand Down

0 comments on commit 34a1a35

Please sign in to comment.