﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
11227	[patch] MapCSS rendering speed could be improved by reducing string/integer conversions.	michael2402	team	"One Reason: Integer Preferences do a lot of Integer->String->Integer conversions

The current implementation of Preferences#getInteger always converts the given integer to a string to supply a default value, no matter if that string is ever required.

Removing this could increase MapCSS parsing time a lot.

MapCSS Rendering time can be seen e.g. when rendering an element for the first time. I did some testing with loading a big file and here are the timings for the first frame:
Phase 1: 74s (without profiler active)

I added an integer value cache to skip the integer/string conversions, this is the resulting render time:
Etwas verbessert (Patch im Git): Phase 1: 59,7s  (without profiler active)

Either the MapCSS code should cache the preferences or the preferences should handle integers more efficiently.

I logged the preference access count, those were the results:
  mappaint.node.tagged-size: 6855217
  mappaint.node.unselected-size: 6855217
  mappaint.node.connection-size: 6855217
  mappaint.fillareas: 49
  mappaint.fillalpha: 401978
  mappaint.node.selected-size: 6855217"	enhancement	closed	normal	15.03	Core		fixed	Preferences	Klumbumbus
