optimizations for large forms

goes with 03780c; for tp #1268