Adding more specific performance logging
Only rebuilding the region map when necessary

I.e., when changing the source image or the region sizes. When
changing a paint-only attribute such as line thickness, regenerating
the region map is unnecessary.