The promises based implementation is much slower than the callback based implementation.
I am wondering why exactly that is the case.
var Q = require("q");
var SCANNER = require("./promises");
//var SCANNER = require("./callbacks");
module.declare([], function(require, exports, module) | |
{ | |
exports.main = function() | |
{ | |
} | |
exports.app = function() | |
{ | |
var counter = 0; |
{"text":"","path":"","id":"","expanded":true,"children":[{"text":"Users","path":"","id":"","expanded":true,"children":[{"text":"cadorn/pinf/workspaces/github.com/cadorn/com.cadorn.baby/projects/firephp/packages/test-symfony2/public","path":"","id":"","expanded":true,"children":[{"text":"app","path":"","id":"","expanded":false,"children":[{"text":"AppKernel.php","path":"/Users/cadorn/pinf/workspaces/github.com/cadorn/com.cadorn.baby/projects/firephp/packages/test-symfony2/public/app/AppKernel.php","id":"/Users/cadorn/pinf/workspaces/github.com/cadorn/com.cadorn.baby/projects/firephp/packages/test-symfony2/public/app/AppKernel.php","leaf":true},{"text":"autoload.php","path":"/Users/cadorn/pinf/workspaces/github.com/cadorn/com.cadorn.baby/projects/firephp/packages/test-symfony2/public/app/autoload.php","id":"/Users/cadorn/pinf/workspaces/github.com/cadorn/com.cadorn.baby/projects/firephp/packages/test-symfony2/public/app/autoload.php","leaf":true},{"text":"bootstrap.php.cache","path":"/Users/cadorn/pinf/workspac |
var FILE = require("file"), | |
URL = require("url"), | |
BYTE_STREAMS = require("byte-streams"), | |
UNLOAD = require("unload"), | |
TIMER = require("timer"); | |
// JSON = provided by jetpack as a global | |
var Cc = require("chrome").Cc; | |
var Ci = require("chrome").Ci; | |
var Cu = require("chrome").Cu; |
function processSequentially() | |
{ | |
console.log("start queue"); | |
var result = Q.defer(); | |
var done; | |
[ | |
["1", 2], | |
["2", 4], | |
["3", 3], | |
["4", 9], |
| Running program (equivalent command): commonjs --platform v8cgi /pinf/workspaces/github.com/pinf/test-programs-js/JSLintBenchmark | |
|--- Program stdout & stderr follows ---> | |
Running JSLint Benchmark by running JSLint against itself ... | |
... took: 0.364 seconds | |
macbook-home-cadorn-net:test-programs-js cadorn$ commonjs --platform gpsee ./ JSLintBenchmark/ | |
JS strict warning #157 in gpsee.js at line 164 ch 8 - anonymous function does not always return a value | |
JS strict warning #157 in gpsee.js at line 171 ch 15 - anonymous function does not always return a value | |
JS strict warning #127 in gpsee.js at line 328 ch 12 - variable parent redeclares argument | |
JS strict warning #110 in gpsee.js at line 469 ch 8 - function validate does not always return a value | |
JS strict warning #157 in gpsee.js at line 548 ch 41 - anonymous function does not always return a value |
/** | |
* Copyright: 2012 Christoph Dorn <[email protected]> | |
* License: MIT | |
* Source: https://gist.github.com/1725325 | |
* | |
* NodeJS Example: | |
* | |
* // Requirements: `npm install q` | |
* | |
* var Q = require("q"); |
Collaboration on packages is the precursor to an entire new paradigm of collaborative system development.
Join a group of people interested in collaborative realtime distributed system development and associated tooling.
You recognize that it takes many small components to make a large system and that there is no adequate open source tooling to assist with the creative process of modelling complex systems and making them a reality.
Time: Every Wednesday 10am - 11am PST
Where: Google Hangouts on Air (links will be sent to mailing list every week)
You activate a workspace by placing environment variables into your shell and modifying the PATH
.
Shell environment variables represent the root config layer and all config resolving must happen from this base layer. If any code in your codebase must resolve config info it MUST have access to environment variables directly or indirectly or at the very least to the root path of the workspace so the environment variables may be established by loading and parsing the raw files.
Any config resolution logic must in its entirety be seeded by the environment variables and may then branch out with arbitrary logic. Ideally further config resolution layers follow rules and patterns that me be shared across implementations.
Given a file tree such as: