You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To reduce request payload size (by around 30%), it's possible to do something like query.replace(/\s/g, '') before serializing the queryString for transmission. The catch is that you have to separate fields by a comma. Unfortunately, if the string is created via print, it won't include commas. Would you be open to a PR allowing for an option to print a string "ugly", meaning replacing newlines & spaces with commas?
The text was updated successfully, but these errors were encountered:
This is a good idea. In the future we should have print and prettyPrint instead of introducing uglyPrint, but in the near term I think it's worth investigating this.
My only feedback is to definitely use compressed requests (usually supported by default in whatever network environment you're using). You should then compare the gzip size of your output from "ugly print" rather than the raw request size. Since multiple spaces tend to compress really well, and because the rest of your document is probably ASCII with english words, you're likely to see very impressive compression, and "ugly" queries are likely to be insignificant - either way I'm super curious to see data on that assumption.
To reduce request payload size (by around 30%), it's possible to do something like
query.replace(/\s/g, '')
before serializing the queryString for transmission. The catch is that you have to separate fields by a comma. Unfortunately, if the string is created viaprint
, it won't include commas. Would you be open to a PR allowing for an option to print a string "ugly", meaning replacing newlines & spaces with commas?The text was updated successfully, but these errors were encountered: