Dave Jarvis' Repositories

git clone https://repo.autonoma.ca/repo/treetrek.git

Increases RAM for cloning

AuthorDave Jarvis <email>
Date2026-02-21 19:00:34 GMT-0800
Commit82b2e36437aff323c099bea95e842f826ffd8a2e
Parent38e909f
git/GitPacks.php
class GitPacks {
- private const MAX_RAM = 1048576;
+ private const MAX_RAM = 8388608;
private PackStreamManager $manager;
git/PackEntryReader.php
class PackEntryReader {
private const MAX_DEPTH = 200;
- private const MAX_BASE_RAM = 2097152;
+ private const MAX_BASE_RAM = 8388608;
+ private const MAX_CACHE = 1024;
private DeltaDecoder $decoder;
$this->cache[$offset] = $result;
- count( $this->cache ) > 50 ? array_shift( $this->cache ) : null;
+ if( count( $this->cache ) > self::MAX_CACHE ) {
+ unset( $this->cache[array_key_first( $this->cache )] );
+ }
}
Delta6 lines added, 3 lines removed, 3-line increase