Perf imporovement by caching attributes