<commit_before>require 'cow_proxy'

module CowProxy
  module ActiveScaffold
    module DataStructures
      class Column < ::CowProxy::WrapClass(::ActiveScaffold::DataStructures::Column)
        delegate :name, to: :__getobj__

        def link
          return @link if defined?(@link)
          if __getobj__.frozen?
            link_var = __getobj__.instance_variable_get(:@link)
            if link_var.is_a?(Proc)
              @link = link_var.call self
              return @link
            end<commit_msg>speed up reading cache_key from column in threadsafe, called many times<commit_after>require 'cow_proxy'

module CowProxy
  module ActiveScaffold
    module DataStructures
      class Column < ::CowProxy::WrapClass(::ActiveScaffold::DataStructures::Column)
        # readonly and called many times in list action
        delegate :name, :cache_key, to: :__getobj__

        def link
          return @link if defined?(@link)
          if __getobj__.frozen?
            link_var = __getobj__.instance_variable_get(:@link)
            if link_var.is_a?(Proc)
              @link = link_var.call self
              return @link
            end
{'fraction_non_alphanumeric': 0.0779896013864818, 'fraction_numerical': 0.0, 'mean_word_length': 2.4477611940298507, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5990508', 'n_tokens_mistral': 327, 'n_tokens_neox': 326, 'n_words': 84}