Uploaded image for project: 'Puppet'
  1. Puppet
  2. PUP-8549

Reduce regular expression garbage in puppet

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Normal
    • Resolution: Fixed
    • None
    • PUP 5.5.1
    • None
    • None
    • Froyo
    • Needs Assessment
    • Not Needed
    • Needs Assessment

    Description

      Lots of garbage is generated by the ValidTagRegex in tagging.rb, as on JRuby it's forced to rebuild the regular expression every time it is matched against a string of a different encoding.

       

      One solution is to put a u on the end to force UTF-8 and not let it change. It will fail hard if it encounters something other than UTF-8 or ASCII. There is a test that fails when this change is applied and I'm not sure whether the test is wrong or the fix is wrong.

       

      Another solution would be to make sure strings reaching that are almost always UTF-8 (an occasional cache invalidation won't hurt too much, but right now it seems to happen on every match).

      Attachments

        Issue Links

          Activity

            People

              justin Justin Stoller
              patrick Patrick Carlisle
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Zendesk Support