...

/

Using goroutines for Performance

Using goroutines for Performance

This lesson focuses on handling multiple clients at the same time through goroutines.

We'll cover the following...

There is still a performance problem with the 2nd version if too many clients attempt to add URLs simultaneously. Our map is safely updated for concurrent access thanks to the locking mechanism, but the immediate writing of each new record to disk is a bottleneck. The disk writes may happen simultaneously, and depending on the characteristics of your OS, this may cause corruption. Even if the writes do not collide, each ...