Skip to content

Commit b52a5dd

Browse files
committed
Perf Improvment: Split on first occurance
For large caches, this prevents split from reading the entire string.
1 parent 6d9638f commit b52a5dd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/props_template/extension_manager.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ def handle_cache(options, item)
9191
result
9292
end
9393

94-
meta, raw_json = state.split("\n")
94+
meta, raw_json = state.split("\n", 2)
9595
next_deferred, next_fragments = Oj.load(meta)
9696
deferred.push(*next_deferred)
9797
fragments.push(*next_fragments)

0 commit comments

Comments
 (0)