-
Notifications
You must be signed in to change notification settings - Fork 366
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Invalidate hub-wide caches on deletions and overwrites (#7525)
Hub-wide caches now subscribe to store events and invalidate accordingly in the face of deletions and overwrites. This is a crutch to compensate for the lack of secondary caching, but a much needed crutch: the Rerun Viewer can now effectively be used as a soft realtime telemetry system. https://github.com/user-attachments/assets/f1136f9d-e1fd-4e6b-87c6-422d5f3345e8 * Fixes #7404 --- ## Checklist ### `EncodedImage` ```python for _ in range(0, 100): rr.log("image", rr.EncodedImage(path=image_file_path), static=True) time.sleep(0.01) # give time for the viewer to query and cache it ``` Before: 🟥 After: 🟢 ### `Mesh3D` ```python for _ in range(0, 100): rr.log( "triangle", rr.Mesh3D( vertex_positions=np.tile(np.array([[0.0, 0.0, 0.0], [1.0, 0.0, 0.0], [0.0, 1.0, 0.0]]), (33333, 1)), vertex_normals=[0.0, 0.0, 1.0], vertex_colors=[255, 0, 0], ), static=True, ) time.sleep(0.01) # give time for the viewer to query and cache it ``` Before: 🟥 After: 🟢 ### `Asset3D` ```python for _ in range(0, 100): rr.log("world/asset", rr.Asset3D(path=sys.argv[1]), static=True) time.sleep(0.01) # give time for the viewer to query and cache it ``` Before: 🟥 After: 🟢 ### `TensorData` ```python for _ in range(0, 1000): rr.log("tensor", rr.Tensor(tensor, dim_names=("width", "height", "channel", "batch")), static=True) time.sleep(0.01) # give time for the viewer to query and cache it ``` Before: 🟥 After: 🟢 ### `AssetVideo` ```python frame_timestamps_ns = video_asset.read_frame_timestamps_ns() rr.send_columns( "video", times=[rr.TimeNanosColumn("video_time", frame_timestamps_ns)], components=[rr.VideoFrameReference.indicator(), rr.components.VideoTimestamp.nanoseconds(frame_timestamps_ns)], ) for _ in range(0, 100): rr.log("video", video_asset, static=True) time.sleep(0.01) # give time for the viewer to query and cache it ``` Before: 🟥 After: 🟢 --------- Co-authored-by: Andreas Reich <andreas@rerun.io>
- Loading branch information
Showing
11 changed files
with
419 additions
and
107 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.