Perf improvements and datetime attribute update fix