Re: Trouble with new tracker designator?

"John P. Rouillard" <[email protected]>
Newsgroups gmane.comp.bug-tracking.roundup.user
Message-ID <[email protected]>
Hi Ralf:

In message <[email protected]>,
Ralf Schlatterbeck writes:
>On Tue, Jul 21, 2020 at 11:50:05PM -0400, John P. Rouillard wrote:
>> I did a little performance testing with the various possible re's
>> and a subset of the cases you tested.
>> 
>> Compiling the better re is .9% slower and your best re is 3.6% worse
>> than current.
>> 
>> Matching is 35% worse for the better re and 45% worse for your best
>> re. I don't have good stats on how often splitDesignator is called and
>> how much of an impact a 45% slowdown would cause. Trying to use
>> cProfile and pstats isn't exactly clear.
>
>I don't think that parsing a string of typically max. len 20 or so will
>significantly impact performance.

It looks like permission check in the web interface calls
splitDesignator. Neither splitDesignator nor the calls from
cgi/actions.py:PermCheck::permissions show up in the perf data. So my
conclusion is that you are right and that is not called enough to show
up.

>> Technically _ is not a letter. I wonder if we should keep classes
>> starting with _ in reserve for future use (hidden/internal class for
>> whatever that means).
>
>Yes, especially since roundup re-maps table names to start with an
>underscore, no idea what a double underscore would do but I'd not permit
>names with a starting underscore.

Fair enough. I don't expect that double underscore would be an issue
though.

Now if we represented the table for class _classname as _classname
rather than __classname, I can see that leading to maddness. But that
doesn't appear to be an issue given a quick perusal of backends and
roundupdb.
 
>> However if we properly limit class names in Class::__init__ I wonder
>> if we can simplify the re in splitDesignator assuming that the
>> designator has a classname of initial alpha, alphanumerics (plus _)
>> and no trailing digits. That still leaves us with a 35% slowdown over
>> the current re which doesn't support embedded numbers in classnames
>> 8-(.
>
>Fine with me.
>
>Thanks to Tom for finding this and reporting it!

Yeah that's a wierd one.

>And thanks John for so deeply looking into it.

I have some free time these days so....

Thanks for your thoughts. I appreciate the feedback.

Have a great week.

--
				-- rouilj
John Rouillard
===========================================================================
My employers don't acknowledge my existence much less my opinions.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.