Carrot2

Hard cache of Fields for Bindable classes.

Details

  • Type: Improvement Improvement
  • Status: Resolved Resolved
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: None
  • Fix Version/s: 3.4.0
  • Component/s: C# API, Framework Core
  • Labels:
    None

Description

I suggest we simply create a hard HashMap<Class<?>, Collection<Field>> for this lookup:

        // Get all fields (including those from bindable super classes)
        final Collection<Field> fieldSet = BindableUtils
            .getFieldsFromBindableHierarchy(object.getClass());

There will always be a limited set of classes to consider and this saves lots of reflection.

Activity

Hide
Dawid Weiss added a comment -

Switched to hard cache.

Show
Dawid Weiss added a comment - Switched to hard cache.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: