Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-48496

Use static regex Pattern instances in common/utils JavaUtils

    XMLWordPrintableJSON

Details

    Description

      Some methods in JavaUtils.java are recompiling regexes on every invocation; we should instead store a single cached Pattern.

      This is a minor perf. issue that I spotted in the context of other profiling. Not a huge bottleneck in the grand scheme of things, but simple and straightforward to fix.

      Attachments

        Issue Links

          Activity

            People

              joshrosen Josh Rosen
              joshrosen Josh Rosen
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: