File tree Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -81,6 +81,8 @@ require "ruby_lsp/load_sorbet"
8181$LOAD_PATH. unshift ( File . expand_path ( "../lib" , __dir__ ) )
8282require "ruby_lsp/internal"
8383
84+ T ::Utils . run_all_sig_blocks
85+
8486if options [ :debug ]
8587 if [ "x64-mingw-ucrt" , "x64-mingw32" ] . include? ( RUBY_PLATFORM )
8688 $stderr. puts "Debugging is not supported on Windows"
Original file line number Diff line number Diff line change @@ -876,6 +876,11 @@ def perform_initial_indexing
876876 send_message ( Notification . window_show_error ( "Error while indexing: #{ error . message } " ) )
877877 end
878878
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+
879884 # Always end the progress notification even if indexing failed or else it never goes away and the user has no
880885 # way of dismissing it
881886 end_progress ( "indexing-progress" )
You can’t perform that action at this time.
0 commit comments