-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1244 from ruby-china/fix-for-3.8
Fix for 3.8
- Loading branch information
Showing
12 changed files
with
91 additions
and
155 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
class RemoveFollowerIdsFromUsers < ActiveRecord::Migration[6.1] | ||
def change | ||
# Remove unused Array fields, they were instead by ActionStore | ||
# ref: https://github.com/ruby-china/homeland/pull/857 | ||
remove_column :users, :follower_ids | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
module Homeland | ||
class << self | ||
def version | ||
"3.8.0" | ||
"3.8.1" | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# frozen_string_literal: true | ||
|
||
task memory: :environment do | ||
require "homeland" | ||
include ApplicationHelper | ||
include ActionView::Helpers::OutputSafetyHelper | ||
include ActionView::Helpers::TextHelper | ||
|
||
str = Homeland::Markdown.example | ||
|
||
a = [] | ||
|
||
puts "Starting to profile memory..." | ||
b = {} | ||
puts "Before =>" | ||
print_memory | ||
|
||
count = 5_000_000 | ||
step = (count / 100).to_i | ||
count.times do |i| | ||
sanitize_markdown(Homeland::Markdown.call(str)) | ||
|
||
if i % step == 0 | ||
print_memory | ||
end | ||
end | ||
|
||
print_memory | ||
puts GC.start | ||
puts "After GC" | ||
print_memory | ||
end | ||
|
||
def print_memory | ||
rss = (`ps -eo pid,rss | grep #{Process.pid} | awk '{print $2}'`.to_i / 1024.0).round(1) | ||
puts "rss: #{rss}mb live objects #{GC.stat[:heap_live_slots]}" | ||
end |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters