mirror of
https://github.com/neocities/neocities.git
synced 2025-07-23 02:56:05 +02:00
optimize performance for site profile render
This commit is contained in:
parent
13988ad74a
commit
e1eb377a92
8 changed files with 38 additions and 171 deletions
|
@ -6,7 +6,7 @@ class SiteChange < Sequel::Model
|
|||
one_to_many :site_change_files
|
||||
|
||||
def site_change_filenames(limit=4)
|
||||
site_change_files[0..limit-1].collect {|f| f.filename}.sort_by {|f| f.match('html') ? 0 : 1}
|
||||
site_change_files_dataset.select(:filename).limit(limit).all.collect {|f| f.filename}.sort_by {|f| f.match('html') ? 0 : 1}
|
||||
end
|
||||
|
||||
def self.record(site, filename)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue