Skip to content

Fix video billing for rtsp#2117

Merged
digaobarbosa merged 22 commits intomainfrom
fix-video-billing-for-rtsp
Mar 17, 2026
Merged

Fix video billing for rtsp#2117
digaobarbosa merged 22 commits intomainfrom
fix-video-billing-for-rtsp

Conversation

@digaobarbosa
Copy link
Copy Markdown
Contributor

What does this PR do?

The billing for RTSP and MJPEG were being charged as images instead of video hosting.

Type of Change

  • Bug fix (non-breaking change that fixes an issue)

Testing

  • I have tested this change locally
  • I have added/updated tests for this change

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code where necessary, particularly in hard-to-understand areas
  • My changes generate no new warnings or errors
  • I have updated the documentation accordingly (if applicable)

Additional Context

digaobarbosa and others added 21 commits March 2, 2026 14:45
The optimization replaced `all(k not in prediction for k in ["top", "predicted_classes"])` with a direct boolean expression `("top" not in prediction and "predicted_classes" not in prediction)` in `is_prediction_registration_forbidden`, eliminating generator overhead and reducing that function's profiled time from 70.7% to 24% of its own cost. This hot helper is called on every datapoint registration (1125 calls in the profiler), so removing the generator iteration yields a cumulative ~4.7 ms speedup across all invocations, driving the overall 15% runtime improvement from 6.24 ms to 5.39 ms.

Co-authored-by: codeflash-ai[bot] <148906541+codeflash-ai[bot]@users.noreply.github.com>
@digaobarbosa digaobarbosa enabled auto-merge (squash) March 17, 2026 18:38
@digaobarbosa digaobarbosa merged commit d9bbf5f into main Mar 17, 2026
46 checks passed
@digaobarbosa digaobarbosa deleted the fix-video-billing-for-rtsp branch March 17, 2026 18:44
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.

3 participants