The delay on switch opening is a few tenths of a millisecond at most. The Spice Simulation shows the switch input (yellow) and the opto current (red).
The point at which the opto output opens depends on the version of the PC817 used. Peak OPTO LED current is about 15 mA. If the turn-off point is 2 mA then the delay is 0.1mS.
Diode D10 is in the simulation to make the V1 voltage pulse generator behave like switch contact. It isolates the voltage pulse generator when low to simulate the open switch contact.