Blocking startup GpuControlList::LoadList is called twice, once with gpu_blacklist_json (26KB) and once with gpu_driver_bug_list_json (42KB).
First these strings are copied into std::strings for 114KB of allocation and memcpy. Then these strings are parsed as JSON, taking 5 and 6 ms respectively, for a total of 11ms blocked startup time on my Z840.
Then this JSON list is converted to a vector of refcounted objects. Then that vector is filtered, discarding all entries that don't match the current OS.
On my Windows 10 computer, after all of this, my blacklist array is 30 entries and my bug list array is 0 entries.
All of this is REALLY inefficient. I'm seeing LoadList call malloc 23884 times and allocate 998568 bytes. 1214 allocations accounting for 78094 bytes are persistent.
----
I think the design should be stored in static data as structs to require no parsing or allocation, and they should already be filtered by the current OS. The features and bug lists should use constants instead of strings. This initialization of the blacklist should be able to be free.
struct BlackListEntry { // POD only.
int id;
const char* name;
const char* description;
...
};
BlackListEntry kSoftwareRenderingList[84] = {
{ 3,
"GL driver is software rendered. GPU acceleration is disabled",
...
},
...
}
Comment 1 by brettw@chromium.org
, Feb 13 2017