We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
The intro graph is 1.4 MB, ~25% of iD.js, ~50% of iD.min.js, ~20% of retained memory on a fresh page load.
It should either be compressed somehow, or loaded only on demand and unloaded when finished.
The text was updated successfully, but these errors were encountered:
10ce128
For now I shrunk it to 527k. It can shrink a lot more - much of the graph is river geometries that extend well beyond where the tutorial is.
var fs = require('fs'), _ = require('../js/lib/lodash.js'); var graph = JSON.parse(fs.readFileSync('./introGraph_orig.json', 'utf8')); _.each(graph, function(v,k) { var tags = _.omit(v.tags, function(v,k) { if (k.indexOf('tiger:') !== -1) return true; if (k.indexOf('addr:') !== -1) return true; if (k.indexOf('gnis:') !== -1) return true; if (k.indexOf('is_in') !== -1) return true; if (['ele','source','wikipedia','website','created_by'].indexOf(k) !== -1) return true; return false; }); graph[k] = _.omit(v, ['version','changeset','user','uid','visible','timestamp']); if (_.isEmpty(tags)) { delete graph[k].tags; } else { graph[k].tags = tags; } }); fs.writeFileSync('introGraph.js', "iD.introGraph = '" + JSON.stringify(graph) + "';");
Sorry, something went wrong.
For comparison, imagery.json is now at 995K
imagery.json
Updated again, imagery.json now at 274K. We were unnecessarily pretty printing it.
aaronlidman
No branches or pull requests
The intro graph is 1.4 MB, ~25% of iD.js, ~50% of iD.min.js, ~20% of retained memory on a fresh page load.
It should either be compressed somehow, or loaded only on demand and unloaded when finished.
The text was updated successfully, but these errors were encountered: