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

Reduce allocated memory in `lib/puppet/pops/parser/lexer2.rb`

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Normal
    • Resolution: Fixed
    • None
    • PUP 7.13.0, PUP 6.26.0
    • None
    • Bug Fix
    • Reduce lexer memory usage
    • Needs Assessment

    Description

      PUP-11232 added # frozen_string_literal: true to some high memory consumption files but even after that, lib/puppet/pops/parser/lexer2.rb still seems to have the most memory allocated.

      Proposed investigation direction as stated by josh:

      I'm guessing the lexer2 allocations are due to the closure scope bound to each lambda? I'm thinking Ruby may be doing more work than is necessary to create the Binding as each token is scanned and the corresponding lambda is called? Or perhaps it's the byteslice calls?

      Attachments

        Activity

          People

            josh Josh Cooper
            luchian.nemes Luchian Nemes
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Zendesk Support