[Qgis-user] QML rules slow + Some code to embed images into qml automagically?

Richard Duivenvoorde rdmailings at duif.net
Sun Jun 1 02:43:17 PDT 2025


Hi,

In a plugin I load polygons in a layer, of which the user has a Rulebase styling with 1400(!) rules AND 1400 path's to small png's...

I was wondering if there is some plugin/code maybe which:

Given the qml with things like:
<Option type="QString" value="./test_data/symbols/foo.png" name="imageFile"/>
would transform this qml in a qml version with the symbols (base64) embedded.

I'm aware you can do that one by one (https://github.com/qgis/QGIS/pull/7433) but before writing code to do it in one go, I thought to ask here...

Another thing with this huge qml is that it is rather slow. (10seconds and a popup 'QGIS is not responding')...
So I'm also wondering if there is a way to 'slimdown'-a qml, something like "clean up the rules and remove all unused rules" or so
Again: seems codable, but...

TIA for any idea's

Regards,

Richard Duivenvoorde


More information about the QGIS-User mailing list