casey-chow / tigertrade

A re-imagining of the TigerTrade trading platform for 2017
https://tigertra.de
MIT License
6 stars 0 forks source link

Only check for User ID when necessary. #262

Closed perrycate closed 7 years ago

perrycate commented 7 years ago

It turns out the time spent on the database is actually only half of the total time spent when searching at most. The issue wsa that when we call getUsername a network call is being made under the hood to see if the current user is CAS-authenticated. By only making that check when necessary, the query parsing time goes from ~25ms to ~25us.