<commit_before>A Rails engine that provides a view helper that will speed your page loads. See the bottom of the README for the example use, that will probably make more sense than me explaining it here.

This is Alpha, naive, itch scratching bozo code. 

Good luck.

## Install

Get the gem:

    gem install rails-async

Or add it to your gemfile:

    gem "rails-async", :require => "async"

## Setup

Add the helper method to you application_controller:

    helper :async

That's it.

## Use

Slow page:

    <h1>Accounts</h1>
    <ul>
      <% sleep 3.8 %>
      <% @accounts.each do |account| %>
        <li>
          <%= render 'account', :account => account %>
        </li>
      <% end %>
    </ul>

Fast page:

    <h1>Accounts</h1>
    <ul>
      <% asynchronously do %>
        <% sleep 3.8 %>
        <% @accounts.each do |account| %>
          <li>
            <%= render 'account', :account => account %>
          </li>
        <% end %>
      <% end %>
    </ul>

Async worries about responding, you worry about why your code is so slow.

## Unanswered Questions

Scale: how big can it get if we're forking *n* times for every request?

Speed: at what point is an approach like this worse than just rendering the whole page at once? Gotta measure to know if you're improved anything.<commit_msg>merging from origin<commit_after>A Rails engine that provides a view helper that will speed your page loads. See the bottom of the README for the example use, that will probably make more sense than me explaining it here.

This is Alpha, naive, itch scratching bozo code. 

Don't reinvent the wheel. Always reinvent the wheel.

Ponder this, good luck.

## Install

Get the gem:

    gem install rails-async

Or add it to your gemfile:

    gem "rails-async", :require => "async"

## Setup

Add the helper method to you application_controller:

    helper :async

That's it.

## Use

Slow page:

    <h1>Accounts</h1>
    <ul>
      <% sleep 3.8 %>
      <% @accounts.each do |account| %>
        <li>
          <%= render 'account', :account => account %>
        </li>
      <% end %>
    </ul>

Fast page:

    <h1>Accounts</h1>
    <ul>
      <% asynchronously do %>
        <% sleep 3.8 %>
        <% @accounts.each do |account| %>
          <li>
            <%= render 'account', :account => account %>
          </li>
        <% end %>
      <% end %>
    </ul>

Async worries about responding, you worry about why your code is so slow.

## Unanswered Questions

Scale: how big can it get if we're forking *n* times for every request?

Speed: at what point is an approach like this worse than just rendering the whole page at once? Gotta measure to know if you're improved anything.

Practicality of testing: what's the mimimum viable test rig?

Praticality in general: who's gonna use it?
{'fraction_non_alphanumeric': 0.10391459074733096, 'fraction_numerical': 0.0056939501779359435, 'mean_word_length': 2.5314070351758793, 'pattern_counts': {'":': 0, '<': 47, '<?xml version=': 0, '>': 53, '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': '6010709', 'n_tokens_mistral': 900, 'n_tokens_neox': 815, 'n_words': 364}