Nosmai  Effects Nosmai  Moderation Nosmai Try-ons coming soon
Docs menu Optimize lower-tier devices
How-to guide

Optimize lower-tier devices

Reduce camera and effect workload on supported lower-tier devices while preserving one stable processing pipeline and measurable quality targets.

SDK version Native 3.0.4 · Flutter 1.0.2 · React Native 1.0.0 Updated Aug 22, 2026 Time 7 min

Prerequisites

  • A failing or marginal row in the physical-device qualification matrix
  • A reproducible package, camera configuration, and session duration
  • Release-build measurements for frame rate, memory, and thermal state

Reduce the input workload

Start at 720p and 30 FPS. Increase resolution only when the target device matrix proves the higher setting remains stable. Avoid a second camera controller, per-frame image conversion, synchronous readback, and unnecessary preview duplication.

Reduce active processing

  1. Keep one authored package active in each intended slot.
  2. Disable background segmentation when no background feature is visible.
  3. Remove beauty or makeup controls that are set to their neutral value.
  4. Avoid starting processed-frame sampling unless the app consumes it.
  5. Prefer one optimized package over chaining several packages with equivalent output.

The native runtime can selectively skip inference work and adjust recording workload on measured lower-tier Android devices. Host code should still avoid adding its own unbounded queues.

Use latest-frame backpressure

When a consumer cannot keep up, replace pending work with the newest frame. Never accumulate camera frames to preserve every callback; that increases latency and memory until the user sees an old preview.

Verify the optimized experience

Repeat preview, recording, streaming, background/foreground, camera switching, and navigation loops. An optimization is acceptable only when it preserves the required effect output and does not create lifecycle or media regressions.

Common errors

SymptomCauseFix
FPS improves but touch or controls lagWork moved to the UI threadKeep camera and package mutations serialized without blocking UI work
Latency grows during streamingThe host queues every processed frameUse latest-frame backpressure and release native texture slots promptly
Memory rises after every screen visitPreview, listener, or provider cleanup is incompleteStop media work, remove listeners, release the camera owner, then clean up

Next steps

References

Was this page helpful?

Your response helps us prioritize documentation improvements.

Nosmai

An AR and AI company. Founded on the idea that the next decade of software will be visual, and that the tools for it should be within reach of anyone building.

Newsletter

Product updates and release notes. No spam.

© 2026 nosmai, inc · all rights reserved