Skip to content

Refactor: Move DB operations off main thread#208

Draft
sentry[bot] wants to merge 1 commit intomainfrom
seer/refactor/db-main-thread
Draft

Refactor: Move DB operations off main thread#208
sentry[bot] wants to merge 1 commit intomainfrom
seer/refactor/db-main-thread

Conversation

@sentry
Copy link
Copy Markdown

@sentry sentry bot commented Apr 2, 2026

Fixes ANDROID-3. The issue was that: Main thread blocked by EmpowerPlantActivity.onCreate's slowQuery due to catastrophic regex backtracking on long strings.

  • Moved database query execution to a background thread in EmpowerPlantActivity to prevent blocking the UI thread.
  • Removed allowMainThreadQueries() from the AppDatabase builder, enforcing that database operations are performed off the main thread.
  • Simplified a regular expression in a SQL query within StoreItemDAO.

This fix was generated by Seer in Sentry, triggered by Josh Ferge. 👁️ Run ID: 10907478

Not quite right? Click here to continue debugging with Seer.

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 2, 2026

Codecov Report

❌ Patch coverage is 0% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 0.00%. Comparing base (f12aa97) to head (1ad17f7).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
.../vu/android/empowerplant/EmpowerPlantActivity.java 0.00% 1 Missing ⚠️
Additional details and impacted files
@@          Coverage Diff          @@
##            main    #208   +/-   ##
=====================================
  Coverage   0.00%   0.00%           
=====================================
  Files         16      16           
  Lines        864     863    -1     
  Branches      65      65           
=====================================
+ Misses       864     863    -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

0 participants