Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Deferred buffer #1

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
Open

WIP: Deferred buffer #1

wants to merge 9 commits into from

Conversation

jhawthorn
Copy link
Owner

@jhawthorn jhawthorn commented Jun 22, 2021

Here's where we finished at the end of our last stream.

We rewrote ActionView::OutputBuffer to instead of being a subclass of ActiveSupport::SafeBuffer and String

Today we'll continue this project to try to allow concurrent writes to different parts of the page 馃榿 https://twitch.tv/seejohnrun

jhawthorn added a commit that referenced this pull request Sep 9, 2022
The max size here is designed around Ruby's Dir::Tmpname.create which
creates temporary filenames in the format

    $TIMESTAMP-$PID-$RANDOM

I believe the previous value of this field was based on the assumption
that PIDs are 1-65535, which isn't necessarily the case on 64 bit Linux
systems, which can be up to 2**22.

    $ uname -a
    Linux zergling 5.4.11-arch1-1 #1 SMP PREEMPT Sun, 12 Jan 2020 12:15:27 +0000 x86_64 GNU/Linux
    $ cat /proc/sys/kernel/pid_max
    4194304

I've chosen a new value based on what I believe the largest possible
tempname is:

    255 - "20200117-4194304-#{0x100000000.to_s(36)}.lock".length #=> 226

(cherry picked from commit a98f330)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant