I don't know about flies, but some insects, like roaches, have air current sensors near their back legs. If they feel an air current rushing towards them, a signal is sent to their legs to start running forward. This detect/react cycle bypasses the longer trek to the brain and then back down to the legs. With flies and mosquitoes, if you slowly creep up on them with a hand, swatter, tissue box, shoe, etc., and THEN quickly strike, your kill chances are greater. The time difference between them detecting an air current and being smooshed is a lot less. You'd think they'd detect/react to a HUGE object gaining proximity and blocking more light, but nope, they don't.
A fly-swatter is a double-whammy for a fly. The holes means less air resistance, so we can swing faster. Holes also mean less air current rushed at the fly, so they are less likely to detect/react to it. You can also "snap" your wrist so the swatter travels over a wide arc. Not only will you get a fulcrum effect for faster speed, but less of the air current is directed at the fly, so they don't react as well.