Skip to content
New issue

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

批量上报时,用gzip=1判断不是比try catch效率高一些吗? #8

Open
cwtalent opened this issue Sep 14, 2020 · 2 comments

Comments

@cwtalent
Copy link

No description provided.

@white-shiro-bai
Copy link
Owner

非常非常感谢建议,第一次有人读我代码还反馈了,超级开心。

神策官方文档这一页描述了gzip的参数https://manual.sensorsdata.cn/sa/latest/api-1573850.html,用gzip判断效率更高,不用是为了减少测试的工作量,直白的说是我懒。
实际开发中发现gzip这个参数不是每次请求都能带上来,有时候压缩了也没有这个参数,摸什么时候能带上来,什么时候带不上来太难了。
神策官方版是只要格式不符合,这个数据就丢弃,避免脏数据。鬼策想尽可能的把数据存下来,哪怕上报不规范,也尽量兼容,索性就用了try。

@phillip2019
Copy link

这个issue可以关闭了 @white-shiro-bai

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants