msgspec icon indicating copy to clipboard operation
msgspec copied to clipboard

Investigate inlining functions from `annotationlib`

Open ofek opened this issue 2 months ago • 0 comments

Description

Context from https://github.com/jcrist/msgspec/issues/880#issuecomment-3420015782 & https://github.com/jcrist/msgspec/pull/852#discussion_r2107616118 explains that we use 2 functions:

  • get_annotations - this contains a lot of tricky logic which may be difficult to maintain ourselves
  • get_annotate_from_class_namespace - this (currently) contains simple dictionary lookups which would be unlikely to cause a maintenance burden

The task here is only to assess how each of these functions impacts our performance and startup overhead.

ofek avatar Oct 20 '25 01:10 ofek