mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
PERF: limit time spent diffing large blobs of text
REFACTOR: s/.length/.size/g
This commit is contained in:
+1
-1
@@ -299,7 +299,7 @@ class PostRevisor
|
||||
max_diff = SiteSetting.editing_grace_period_max_diff_high_trust.to_i
|
||||
end
|
||||
|
||||
if (original_raw.length - new_raw.length).abs > max_diff ||
|
||||
if (original_raw.size - new_raw.size).abs > max_diff ||
|
||||
diff_size(original_raw, new_raw) > max_diff
|
||||
return false
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user