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

fix(perf): func growingHelper_beautifulJsonString waste a lot of cpu time #312

Merged
merged 1 commit into from
Apr 30, 2024

Conversation

YoloMao
Copy link
Collaborator

@YoloMao YoloMao commented Apr 26, 2024

使用 instrument 测试发现,打印日志所需调用的 growingHelper_beautifulJsonString 函数在 Release 环境下也会调用,导致占用 SDK 线程 15%+ (取决于当前同一时间触发的埋点数,埋点数越多,占用越高) 的 cpu 时间
image

此 PR 使得在 Release 环境下,不再意外调用 growingHelper_beautifulJsonString 函数

@YoloMao YoloMao merged commit f8150cb into master Apr 30, 2024
2 of 5 checks passed
@YoloMao YoloMao deleted the perf/time_profile branch April 30, 2024 09:09
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

Successfully merging this pull request may close these issues.

3 participants