3 ms·
Concurrency is also a problem if you access or lock resources blindly. I once sped up a Java webapp by factor 10 by removing an unnecessary lock in the authenti
by emsy 12y ago
Concurrency is also a problem if you access or lock resources blindly. I once sped up a Java webapp by factor 10 by removing an unnecessary lock in the authentication and authorization code.
- latch 12y agoThis makes me think of a 4th point: Performance problems aren't always tied to CPU usage. Waiting for disk IO is the most common example, but, as you say, coarse locks can also be problematic. Probably the worst I've seen are threaded web frameworks used for making external API calls (to facebook, say). You can a machine doing 0 CPU and Disk, but completely locking up.
- sgift 12y ago> Probably the worst I've seen are threaded web frameworks used for making external API calls (to facebook, say). You can a machine doing 0 CPU and Disk, but completely locking up. Or the intranet equivalent: LDAP group resolution for a user. So slow ... so incredibly slow. I've never seen an application which cannot be (massively) speed up by caching this information after retrieving it the first time.