Visitar URL original
tp: skip arg set dedup for events whose args are almost always unique · Issue #8259 · google/perfetto · GitHub
Skip to content

tp: skip arg set dedup for events whose args are almost always unique #8259

Open

Description

@LalitMaganti

When we commit an arg set, we hash it and look it up in a big hash map in case we've already stored the same set. Sometimes that pays off a lot: in the trace from #8258, one kind of slice (2.24M of them) only has 54 distinct arg sets, so dedup saves about 7.5M rows. But another 2.24M slices in the same trace have 2.23M distinct sets, so for those we're hashing and doing a cache missing map insert every time for basically nothing. Together the hashing and the map cost ~0.5s on that trace.

Turning dedup off completely makes things slower because of all the extra rows, so instead we can decide per kind of event: keep track of how often sets of a given shape actually match, and once a shape has committed a few thousand sets with almost no matches, stop deduping it. In a prototype this took import from 4.59s to 4.34s.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    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