Skip to content

Commit

Permalink
feat: start FlushManager without checking state of stored queue first
Browse files Browse the repository at this point in the history
The `FlushManager` eventually invokes `SendEvents` which checks for the size of stored queue anyways. This change reduces unnecessary complexity and overhead. More context: #92 (comment)
  • Loading branch information
wzieba committed Nov 17, 2023
1 parent a13485c commit cb5113c
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,7 @@ protected ParselyTracker(String siteId, int flushInterval, Context c) {
timer = new Timer();
isDebug = false;

SdkInitKt.initialize(
ParselyCoroutineScopeKt.getSdkScope(),
localStorageRepository,
flushManager
);
flushManager.start();

ProcessLifecycleOwner.get().getLifecycle().addObserver(
(LifecycleEventObserver) (lifecycleOwner, event) -> {
Expand Down
16 changes: 0 additions & 16 deletions parsely/src/main/java/com/parsely/parselyandroid/SdkInit.kt

This file was deleted.

0 comments on commit cb5113c

Please sign in to comment.