Skip to content
This repository was archived by the owner on Aug 17, 2020. It is now read-only.
This repository was archived by the owner on Aug 17, 2020. It is now read-only.

StrictMode for detecting queries on the main thread #66

@JakeWharton

Description

@JakeWharton

StrictMode is lazy and only detects slow queries on the main thread. This is mostly useless since the query execution time is subjective based on the data in the DB and CPU/disk performance of the device.

There's a few options here:

  • Inform StrictMode via noteSlowCall and allow normal penalties to apply. This sucks because there's no granularity between those posting to this method and puts the subjectiveness of what's slow into the libraries. There would be no way to enable slow call penalties from one library but disable it from another. Granted, this is unlikely.
  • Add our own strict mode analogous which allowed the detection of queries running on the UI thread.
  • Provide a composition point for either observable creation or query object creation. This would allow someone to mix in things like main thread checking, or perhaps default schedulers.

This isn't urgent, so we have time to think about what's most appropriate.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions