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

How's the performance behavior #119

Closed
arlyxiao opened this issue Dec 13, 2024 · 1 comment
Closed

How's the performance behavior #119

arlyxiao opened this issue Dec 13, 2024 · 1 comment
Assignees

Comments

@arlyxiao
Copy link

arlyxiao commented Dec 13, 2024

Suppose it's offline and generates 100,0000 events in local without network.
This will create a bunch of JSON files in the events folder.

Once the network is back and available now. Then create one new event and call flush.
Which kind of behavior will it be handled? Will all of the json files be uploaded in one time?

Will this cause the UI performance issue if it uploads huge data in background continuedly?

@wenxi-zeng
Copy link
Contributor

wenxi-zeng commented Dec 13, 2024

@arlyxiao the files will be scheduled to upload. the SDK runs on a different scope and coroutine entirely and uses a dedicated file thread, so no it won't impact UI. in addition, you could write your own flush policy if you worry about uploading too many files at once. if you interest in performance benchmark, please check out the following:
https://segment.com/blog/sdk-performance-improvements/

it's not c#, but c# uses the exact same architecture.

one thing to note, the default FrequencyFlushPolicy tries to flush on a fix interval regardless the status of network. this could lead to some overhead. you should write your own policy to disable analytics temporary if network offline is a primary concern

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

2 participants