Skip to content

Standardize the signature for updateFromExternalObject #30

@jamadden

Description

@jamadden

The hot code path in internalization checks to see if update.updateFromExternalObject wants a "dataserver" keyword or a "context" or nothing. This has a few problems:

  1. Checking the argspec is insanely slow. In one test, it was 5.28us, vs checking an isinstance which clocked in at around 200ns. That's 26x slower. (I was able to get rid of argspec there, but I don't know if I can do that here while preserving compatibility.)
  2. A dataserver argument doesn't make any sense.
  3. There's a fallback path that passes nothing if we can't be exactly sure what the signature is.

This all needs to be simplified, starting with dropping the dataserver argument, and then maybe requiring everyone to accept a context argument.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions