Skip to content

Conversation

@mondeja
Copy link

@mondeja mondeja commented Oct 23, 2025

This is a 🙋 feature or enhancement.

Summary

Remove the unmaintained and unused pathutil dependency.

Context

The pathutil dependency was added in #4859, but the refactors #9015 and #7707 removed all references to it. #9015 forget to remove it as a dependency.

Added a benchmark to see the memory and time needed to load lib/jekyll.rb. These benchmarks are showing in my local environment that:

  • Before the change, library cold boot memory used was 3074.051 KB
  • After the change, is using 2996.818 KB

Benchmark script:

require "benchmark"
require "objspace"

def measure_time(label)
  t = Benchmark.realtime { yield }
  puts "Time: #{t.round(4)}s"
end

def measure_memory(label)
  GC.start
  mem_before = ObjectSpace.memsize_of_all
  yield
  GC.start
  mem_after = ObjectSpace.memsize_of_all
  mem_used = mem_after - mem_before
  puts "Memory: #{mem_used / 1024.0} KB"
end

def measure(label)
  puts label
  measure_time(label) do
    measure_memory(label) do
      yield
    end
  end
end

measure("lib/jekyll.rb load") do
  load_relative = File.expand_path("../lib/jekyll.rb", __dir__)
  load load_relative
end

Copy link
Member

@mattr- mattr- left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the cleanup! I left a question.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants