From:  Joey Schorr <jschorr@gmail.com>
Date:  16 Aug 2015 02:55:33 Hong Kong Time
Newsgroup:  news.mozilla.org/mozilla.dev.js-sourcemap
Subject:  

Re: Source map Simple format proposal

NNTP-Posting-Host:  63.245.214.181

A blast from the past!

This is similar in design to version 1 of Source Maps, which I prototyped
at Google in 2009. You can still see the original "parsing" code here:
https://code.google.com/p/closure-inspector/source/browse/trunk/chrome/content/inspector/sourcemap.js#136

We moved away from doing so not only because of file size concerns, but
performance as well. At the time, pulling the entire JSON object at load
time into memory was less efficient than having a string, even if we had to
parse the string to find column positions. We actually had separate JSON
objects on each textual line as a way to partly alleviate the "load entire
contents" issue.

I imagine that these concerns are somewhat still valid for extremely large
maps, but far less so today where JSON parsers are far more optimized. It
might be worth adding some benchmarks of parsing the JSON-only format vs
the current version 3 format.

Thanks,
Joey Schorr


On Sat, Aug 15, 2015 at 2:28 PM,  wrote:

> I've worked with source maps for a few years now. I've contributed to
> several compilers and worked with source map issues on them, such as
> [reworkcss/css], [postcss] and [CoffeeScript]. I've also contributed to
> [mozilla/source-map].
>
> I've thought a long time about proposing an alternate, human readable
> format to complement today's (version 3) format. You can read all about it
> here:
>
> https://gist.github.com/lydell/a391bc1d01b2bfd52004
>
> The above link also contains real-world testing and practical examples of
> the proposed format.
>
> I'd love to hear somebody else's opinions, thoughts and feelings on this!
>
> [reworkcss/css]: https://github.com/reworkcss/css/
> [postcss]: https://github.com/postcss/postcss/
> [CoffeeScript]: http://coffeescript.org/
> [mozilla/source-map]: https://github.com/mozilla/source-map/
> _______________________________________________
> dev-js-sourcemap mailing list
> dev-js-sourcemap@lists.mozilla.org
> https://lists.mozilla.org/listinfo/dev-js-sourcemap
>