Optimized context creation