File I/O Problems
- Disk access is slower than memory access
- Simultaneous write/write operations cause data corruption. Therefore locking must occur—which is slow
Tips:
- Use the disk in concentrated bits, meaning do all your writing together.
- Try and put write operations where they will cause the least loss in user experience (remember, web pages are chunked!)
- Close the session handler ASAP with session_write_close()