Skip to content

Commit

Permalink
fix(compare): lower max compare read size to 10kb
Browse files Browse the repository at this point in the history
(from 1mb)
  • Loading branch information
GeopJr committed Jan 5, 2023
1 parent d63c283 commit d8fb19a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/collision/views/tools/compare.cr
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
module Collision::Compare
extend self

MAX_COMPARE_READ_SIZE = 1000000
# We want to only check the file contents
# IF the file is smaller than the size below.
# We want to avoid loading a huge file in
# memory but also avoid false-positives.
MAX_COMPARE_READ_SIZE = 10000 # in bytes

def init
TOOL_COMPARE_BUTTON.clicked_signal.connect do
Expand Down

0 comments on commit d8fb19a

Please sign in to comment.