Skip to content
  • Jean Boussier's avatar
    cf7db80f
    Refactor ActiveRecord::Type::TypeMap · cf7db80f
    Jean Boussier authored
    A good part of the complexity was to support the HashLookupTypeMap
    subclass that's only used by the Postgres adapter.
    
    In the end they have a similar-ish interface but this inheritance
    doesn't help much.
    
    Worse, adapters using `TypeMap` doesn't need extra arguments. By
    skipping this unused feature, we can drastically reduce the memory
    footprint, as this feature imposed a 320B per entry overhead.
    cf7db80f
    Refactor ActiveRecord::Type::TypeMap
    Jean Boussier authored
    A good part of the complexity was to support the HashLookupTypeMap
    subclass that's only used by the Postgres adapter.
    
    In the end they have a similar-ish interface but this inheritance
    doesn't help much.
    
    Worse, adapters using `TypeMap` doesn't need extra arguments. By
    skipping this unused feature, we can drastically reduce the memory
    footprint, as this feature imposed a 320B per entry overhead.
Loading