Skip to content

Image Compression takes excessive time and stalls /targets/all route聽#384

Open
1 of 3 issues completed

Description

@WilyHyperion

馃悰 Bug

When /targets/all is called, all available images are compressed synchronously before being encoded to JSON

To Reproduce

Steps to reproduce the behavior:

  1. Wait for the plane to enter FlySearch and get some detections
  2. Choose the reports page and set the interval to a positive number
  3. Observe ~9 seconds delay per image sent

Expected behavior

The route should finish faster (ideally 3-4 seconds max for multiple images)

Additional context

Here are some of the possible solutions we discussed:

  • Replace the compression algorithm with a faster alternative
    • Maybe. look into a CUDA acceleration?
  • Move the compression (and maybe b64 encoding) step to the end of the cv pipeline instead of in the http route
  • Crop images to only send the bounding box and some surrounding area.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions