DOSull / weaving-space

tools for making tileable weave units that give the appearance of a woven material for multivariate thematic mapping
MIT License
19 stars 0 forks source link

Look into performance issues #8

Open DOSull opened 2 years ago

DOSull commented 2 years ago

the Tiling.make_tiling() is quite slow, for various reasons

  1. Maybe we don't really need to store tiles to allow for rotations? it can be a lot more tiles than are used
  2. We gridify the tiles (this is required)
  3. We dissolve them into a giant multipolygon
  4. We explode them to visual elements

In addition step 3 causes issues with tile elements that link across tiles (e.g. the 4.8.8 tiling).

Is there a workaround, or higher performance option? Or 'draft mode' that would allow for more rapid prototyping?

Thoughts:

  1. Dissolve within region zones may be desired in most cases?
  2. What would the implications be of abandoning the all orientations storage option?
  3. Other?
DOSull commented 2 years ago

while performance could always be better the regularise_tile() function now ensures that all tiles are composed only of whole elements, i.e., no joining across tile boundaries is required any more removing the need for a dissolve all into a a giant multipolygon and subsequent explode. There is still a dissolve step but it is within region zones which is much more limited in scope.

Have also realised that with weave patterns aspect < 1 settings can be particularly slow.

Leaving open for now as a reminder...