QuicStreamFactory's |active_jobs_| is a std::map of std::map (std::map<QuicServerId, JobMap>). The JobMap seems to have only 2 or fewer elements (one main Job and one auxiliary Job to skip loading QuicServerInfo). Using a std::map to hold 2 elements seems to be an overkill, considering std::map is also very memory inefficient (https://docs.google.com/document/d/1YL1FORFMWo0FK0lMg7WsImnjNQ3ZpY0nK0NHGjkeHT4/edit?usp=sharing)
Can we refactor the container? Maybe a map of pairs of main job and aux job? That way, we can also add checks to make sure we are expecting <= 2 Jobs for a QuicServerId.
Comment 1 by zhongyi@chromium.org
, Apr 3 2017