[snip]
Many useful :words:.
[snip]
Ok, wow, thanks a lot for the feedback. I thought i was going insane here!
What's going on is this: For each 16x16 blocks you're seeing, it is getting the data for 16x16xZ-Levels tiles from the DF process and caching it into one OpenGL Display List for each Z-Level. The first time this happens it is fairly slow, because it has to do that for literally every 16x16 slice. On later runs it can go a lot faster since it only grabs the memory data, compares it against cached data and only needs to do further processing if it changed. As well, you set the view range to a level that i'd call "ridiculously large" for the moment. So, if you'd wait out the initial load, it should become a good bit faster.
The Calls-Time you're seeing is very reasonable as well. It means that it only takes 0.02 seconds to render what you see on screen, with another 0.01 secs spent on rendering creatures, items and buildings, and 0.01 secs more for occlusion analysis (which i should probably drop as i don't even know if it works anymore). That, with some extra work, combines to 0.06 seconds render time for a frame, which is pretty decent actually.
However, something i've seen on my rig, and which i'm unsure about whether you're seeing it: Sometimes the Calls time just soars for a while, hovers at 200ms and randomly drops down later again. This is without any big change in the data being rendered and i'm very sure that it is caused by using Display Lists, which present the gfx card with cache sorting issues. Display lists are also likely the source of slowness in loading in the data. If you look at the Landscape-Data/3D-Tasks counters, you'll see that the Data tasks run much faster than the 3D tasks and the 3D tasks are where Display Lists are created.
So yeah, that's definitely the next big thing i'll tackle, after these two things:
Thanks for the suggestion of suspending refresh updates while DF is talked. I looked around and i can do some things with cur_year_tick to avoid rechecking stale data.
Also, thanks for reporting that bug. I'll look into what causes it.