Bug report #17596

Adding and Manipulating Legend with large number of project layers extremely slow/freezes (2.99)

Added by George Roth almost 7 years ago. Updated almost 7 years ago.

Status:Closed
Priority:High
Assignee:-
Category:Map Composer/Printing
Affected QGIS version:master Regression?:Yes
Operating System:Windows 10, Ubuntu 17.10 Easy fix?:No
Pull Request or Patch supplied:No Resolution:fixed/implemented
Crashes QGIS or corrupts data:No Copied to github as #:25493

Description

When adding a legend to an existing print composer in a project with a large number (>100) of layers, 2.99 spends at least a minute thrashing the CPU before the legend appears.

Making any changes to the legend (deleting or adding groups/items, deselecting Auto Update, clicking the 'Filter Legend by Map Content' button) results in another minute-plus freeze each time at best, or a total irreversible lock-up of qgis-bin at worst.

Performance in Linux (Ubuntu 17.10, QGIS nightly 2.99.0+git20171129) is very slightly better than in Windows 10 (QGIS weekly 2.99.0-48), but still bad. Performance in 2.18.14 is minimally sluggish (sub-200ms lag), so this is a regression in 2.99.

Unable to provide useful screenshots since this is a time-based issue. I'd be happy to provide some kind of log output if I knew where to look!

Specs:
Intel Core i7-6820HQ 4 cores 2.70GHz
16GB (2X8GB) 2400MHz DDR4 Memory
M.2 512GB SATA Class 20 SSD

I'd also like to create or contribute to a debate about whether adding all project layers, including deselected ones, by default to a new legend item is a good idea (spoiler: I don't think it is!). But I realize that this bug report might not be the best place for that. Maybe that's more of a feature request?

History

#1 Updated by Harrissou Santanna almost 7 years ago

I'd also like to create or contribute to a debate about whether adding all project layers, including deselected ones, by default to a new legend item is a good idea (spoiler: I don't think it is!). But I realize that this bug report might not be the best place for that. Maybe that's more of a feature request?

Already reported as bug, see #13575

#2 Updated by Giovanni Manghi almost 7 years ago

  • Priority changed from Normal to High

#3 Updated by Nyall Dawson almost 7 years ago

  • Status changed from Open to Feedback

Are you using layer presets for your map items?

#4 Updated by Harrissou Santanna almost 7 years ago

@Nyall, does the legend take into account layer presets?
From what i've experienced with the recent releases until c12770d041 (just tested), adding the legend shows always all the layers in the project, ignoring any activation of layer preset.

#5 Updated by George Roth almost 7 years ago

@Nyall I don't believe so. Could you please clarify? I experience the same behavior as Harrisou mentions in his comment above.

#6 Updated by Nyall Dawson almost 7 years ago

Is this still an issue with the new layouts engine and a recent build?

#7 Updated by George Roth almost 7 years ago

Looks like this is essentially fixed (using 22 Jan build in Ubuntu with the hardware and project from the original report). Totally usable now, didn't get the feeling that anything was frozen. It's not blazingly fast, but with 200+ layers and everything running in a VM, what is...

Thanks!

#8 Updated by Nyall Dawson almost 7 years ago

  • Resolution set to fixed/implemented
  • Status changed from Feedback to Closed

Thanks for the confirmation!

Also available in: Atom PDF