Skip to content
  • Jean Boussier's avatar
    17acb771
    Deduplicate various Active Record schema cache structures · 17acb771
    Jean Boussier authored
    Real world database schemas contain a lot of duplicated data.
    Some column names like `id`, `created_at` etc can easily be repeated
    hundreds of times. Same for SqlTypeMetada, most database will contain
    only a limited number of possible combinations.
    
    This result in a lot of wasted memory.
    
    The idea here is to make these data sctructures immutable, use a registry
    to substitute similar instances with pre-existing ones.
    17acb771
    Deduplicate various Active Record schema cache structures
    Jean Boussier authored
    Real world database schemas contain a lot of duplicated data.
    Some column names like `id`, `created_at` etc can easily be repeated
    hundreds of times. Same for SqlTypeMetada, most database will contain
    only a limited number of possible combinations.
    
    This result in a lot of wasted memory.
    
    The idea here is to make these data sctructures immutable, use a registry
    to substitute similar instances with pre-existing ones.
Loading