This patch uses a graph flow scheduler for creating all mesh batches.
On a Ryzen 1700 the framerate of Spring/020_02A.anim.blend went from 10 fps to 11.5 fps.
Flame graph before applying patch
Flame graph after applying patch
For each mesh where batches needs to be updated a sub-graph will be added to the task_graph.
This sub-graph starts with an extract_render_data_node. This fills/converts the required data
Small extractions and extractions that can't be multi-threaded are grouped in a single
Other extractions will create a node for each loop exceeding 4096 items. these nodes are
linked to the user_data_init_task_node. the user_data_init_task_node prepares the userdata
needed for the extraction based on the data extracted from the mesh.
Note: If the lines and lines_loose are requested, the lines_loose sub-buffer is created
as part of the lines extraction. When the lines_loose is only requested the sub-buffer is
created from the existing lines buffer. It is assumed that the lines buffer is always
requested before or together with the lines_loose what is always the case (see
DRW_batch_requested(cache->batch.loose_edges, GPU_PRIM_LINES) in draw_cache_impl_mesh.c).