Skip to content

Commit 934d09a

Browse files
feat: Support 8 byte colors + non-linearity in hash (#466)
## Summary - Support 8 byte color - Add multiplication to fast hashing to achieve non-linearity - Compensate slow down but deeper optimization (performance stays the same) - remove benchmake code and benchmark screenshots from repository <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Medium Risk** > Moderate risk because `TileSignatureManager` now returns `null` when the JNI library isn’t present, which can disable tiled diffing/session replay in environments without `session_replay_c`. Also adjusts keyframe selection logic for `OverlayTiles`, which could affect replay fidelity/size. > > **Overview** > **Session replay tile hashing is now native-only.** `TileSignatureManager` drops the Kotlin fallback/overloads and returns `null` unless the `session_replay_c` JNI library is available. > > **Tiled diff keyframe selection is adjusted.** `TileDiffManager` changes `OverlayTiles` logic to treat `layers <= 0` as always-keyframe and to prioritize periodic keyframes before falling back to “whole-screen diff” detection. > > **Benchmark and parity test code removed from the e2e app.** Deletes the Compose `BenchmarkActivity`/executor/assets, removes its launcher UI/manifest entry, removes the benchmark serialization dependency, and deletes an Android instrumentation test that validated native/Kotlin hash parity. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 9ee51d2. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY -->
1 parent b48de07 commit 934d09a

160 files changed

Lines changed: 174 additions & 1312 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

e2e/android/app/build.gradle.kts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,9 +120,6 @@ dependencies {
120120
implementation(platform(libs.androidx.compose.bom))
121121
implementation("androidx.compose.runtime:runtime")
122122

123-
// Serialization runtime (used by benchmark to encode replay events)
124-
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.8.1")
125-
126123
// Compose UI dependencies -- only for the compose flavor
127124
"composeImplementation"(libs.androidx.activity.compose)
128125
"composeImplementation"(libs.androidx.ui)

e2e/android/app/src/androidTest/java/com/example/androidobservability/TileHashParityInstrumentedTest.kt

Lines changed: 0 additions & 71 deletions
This file was deleted.

e2e/android/app/src/compose/AndroidManifest.xml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,6 @@
1515
<activity
1616
android:name=".masking.ComposeWebActivity"
1717
android:exported="false" />
18-
<activity
19-
android:name=".benchmark.BenchmarkActivity"
20-
android:exported="false"
21-
android:label="Benchmark"
22-
android:theme="@style/Theme.AndroidObservability" />
23-
2418
<activity
2519
android:name=".MainActivity"
2620
android:exported="true"
-22.3 KB
Binary file not shown.
-24.7 KB
Binary file not shown.
-24.7 KB
Binary file not shown.
-167 KB
Binary file not shown.
-224 KB
Binary file not shown.
-203 KB
Binary file not shown.
-124 KB
Binary file not shown.

0 commit comments

Comments
 (0)