Just checking again if anyone has any knowledge of this?

As far as I can see, plsave_set_locale and plrestore_locale temporarily set
the LC_NUMERIC locale to "C" during calls to the driver. This sets the
decimal delimiter and the thousands separator and how many digits are
between the thousands separator.

I really can see no use at all to do this for a fill call or most of the
other calls where it is used. Do some drivers convert numbers to text
during their rendering?

I have just tested and I get a 50% speed increase for my shades calls by
removing the locale calls from grfill. This seems pretty significant.

Thanks
Phil

On Mon, 29 May 2023 at 00:38, Phil Rosenberg <p.d.rosenb...@gmail.com>
wrote:

> Hi all
> I have been making further optimisations to the wxwidgets backen, as I
> have still been finding it painfully slow for plshade calls.
> It turned out that almost all the time within the backend (>99%) was spent
> selecting pens and brushes and allocating memory for every fill within the
> plshade call. Less that 1% was actually spent within the rendering call to
> wxWidgets. I have made some good improvements here.
>
> However, in addition to this, about 50% of the total execution time is
> spent in the setlocale function. This is called before and after each
> polygon fill in the core plplot code.
>
> I wondered if anyone really knows the purpose of these calls? Perhaps they
> are to ensure we have consistent numeric representations across regions? If
> so, then I don't really understand why they are needed for polygon fills.
>
> Any thoughts would be welcome
> Phil
>
_______________________________________________
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel

Reply via email to