Backend optimization: Preload environment and globals