We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b2d6b21 commit 1b8997bCopy full SHA for 1b8997b
lib/ruby_lsp/server.rb
@@ -876,6 +876,11 @@ def perform_initial_indexing
876
send_message(Notification.window_show_error("Error while indexing: #{error.message}"))
877
end
878
879
+ # Indexing produces a high number of short lived object allocations. That might lead to some fragmentation and
880
+ # an unnecessarily expanded heap. Compacting ensures that the heap is as small as possible and that future
881
+ # allocations and garbage collections are faster
882
+ GC.compact
883
+
884
# Always end the progress notification even if indexing failed or else it never goes away and the user has no
885
# way of dismissing it
886
end_progress("indexing-progress")
0 commit comments