{"action":"created","issue":{"url":"https://api.github.com/repos/mapbox/mapbox-gl-js/issues/1841","labels_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/issues/1841/labels{/name}","comments_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/issues/1841/comments","events_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/issues/1841/events","html_url":"https://github.com/mapbox/mapbox-gl-js/pull/1841","id":122390478,"number":1841,"title":"add twitter-cldr for bidirectional text support","user":{"login":"mikemorris","id":1149913,"avatar_url":"https://avatars.githubusercontent.com/u/1149913?v=3","gravatar_id":"","url":"https://api.github.com/users/mikemorris","html_url":"https://github.com/mikemorris","followers_url":"https://api.github.com/users/mikemorris/followers","following_url":"https://api.github.com/users/mikemorris/following{/other_user}","gists_url":"https://api.github.com/users/mikemorris/gists{/gist_id}","starred_url":"https://api.github.com/users/mikemorris/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikemorris/subscriptions","organizations_url":"https://api.github.com/users/mikemorris/orgs","repos_url":"https://api.github.com/users/mikemorris/repos","events_url":"https://api.github.com/users/mikemorris/events{/privacy}","received_events_url":"https://api.github.com/users/mikemorris/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/mapbox/mapbox-gl-js/labels/in%20progress","name":"in progress","color":"ededed"},{"url":"https://api.github.com/repos/mapbox/mapbox-gl-js/labels/text%20rendering","name":"text rendering","color":"bfdadc"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-12-15T23:14:23Z","updated_at":"2015-12-16T18:13:10Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/mapbox/mapbox-gl-js/pulls/1841","html_url":"https://github.com/mapbox/mapbox-gl-js/pull/1841","diff_url":"https://github.com/mapbox/mapbox-gl-js/pull/1841.diff","patch_url":"https://github.com/mapbox/mapbox-gl-js/pull/1841.patch"},"body":"This looks like it's currently inflating the size of the browserify'd package by over 1MB. I'm not sure how much of this could be avoidable by extracting the bidi logic from https://github.com/twitter/twitter-cldr-js (ugh, CoffeeScript) - right now this just pulls in the entire `en.min.js` localization file with `datetime` logic and such too. I THINK the bidi logic is templated and identical across all locales?\r\n\r\nBUT, at least preliminarily, It Works™\r\n\r\n**Before**\r\n<img width=\"144\" alt=\"screen shot 2015-12-15 at 6 19 55 pm\" src=\"https://cloud.githubusercontent.com/assets/1149913/11827216/8fb01d2e-a358-11e5-8233-e34225e83853.png\">\r\n\r\n**After**\r\n<img width=\"143\" alt=\"screen shot 2015-12-15 at 6 19 08 pm\" src=\"https://cloud.githubusercontent.com/assets/1149913/11827212/8e420e16-a358-11e5-8763-4ff9affc1938.png\">\r\n\r\nRefs https://github.com/mapbox/mapbox-gl/issues/4"},"comment":{"url":"https://api.github.com/repos/mapbox/mapbox-gl-js/issues/comments/165198956","html_url":"https://github.com/mapbox/mapbox-gl-js/pull/1841#issuecomment-165198956","issue_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/issues/1841","id":165198956,"user":{"login":"mikemorris","id":1149913,"avatar_url":"https://avatars.githubusercontent.com/u/1149913?v=3","gravatar_id":"","url":"https://api.github.com/users/mikemorris","html_url":"https://github.com/mikemorris","followers_url":"https://api.github.com/users/mikemorris/followers","following_url":"https://api.github.com/users/mikemorris/following{/other_user}","gists_url":"https://api.github.com/users/mikemorris/gists{/gist_id}","starred_url":"https://api.github.com/users/mikemorris/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikemorris/subscriptions","organizations_url":"https://api.github.com/users/mikemorris/orgs","repos_url":"https://api.github.com/users/mikemorris/repos","events_url":"https://api.github.com/users/mikemorris/events{/privacy}","received_events_url":"https://api.github.com/users/mikemorris/received_events","type":"User","site_admin":false},"created_at":"2015-12-16T18:13:10Z","updated_at":"2015-12-16T18:13:10Z","body":"Extracted the bidi logic from twitter-cldr-js in 0ed31d50471eba2f8517436ffd2a9138d6bd7729 and dropped the uncompressed size down to ~25kb. 5d1d89127e8ba80708e19095ce014b5e486eea96 is supposedly faster, but balloons [`bidi_classes.json`](https://github.com/mapbox/mapbox-gl-js/blob/5d1d89127e8ba80708e19095ce014b5e486eea96/js/util/twitter-cldr-bidi/bidi_classes.json) up from ~8kb to over 40kb - should we rewrite this to be smaller, or is there a compression tool in the browserify pipeline that will rewrite the verbose keys?"}}