Skip to content

Commit

Permalink
improve initial importer show page load time
Browse files Browse the repository at this point in the history
  • Loading branch information
orangewolf committed Dec 5, 2024
1 parent a94e796 commit 8a7fe6f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
7 changes: 7 additions & 0 deletions db/migrate/20241205212513_faster_first_entry.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# frozen_string_literal: true
class FasterFirstEntry < ActiveRecord::Migration[5.2]
def change
add_index :bulkrax_entries, [:importerexporter_id, :importerexporter_type, :id], name: 'index_bulkrax_entries_on_importerexporter_id_type_and_id' unless index_exists?(:bulkrax_entries, [:importerexporter_id, :importerexporter_type, :id],
name: 'index_bulkrax_entries_on_importerexporter_id_type_and_id')
end
end
5 changes: 2 additions & 3 deletions spec/test_app/db/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.

ActiveRecord::Schema.define(version: 2024_12_03_010707) do
ActiveRecord::Schema.define(version: 2024_12_05_212513) do

create_table "accounts", force: :cascade do |t|
t.string "name"
Expand Down Expand Up @@ -44,6 +44,7 @@
t.string "status_message", default: "Pending"
t.string "error_class"
t.index ["identifier", "importerexporter_id", "importerexporter_type"], name: "bulkrax_identifier_idx"
t.index ["importerexporter_id", "importerexporter_type", "id"], name: "index_bulkrax_entries_on_importerexporter_id_type_and_id"
t.index ["importerexporter_id", "importerexporter_type"], name: "bulkrax_entries_importerexporter_idx"
t.index ["type"], name: "index_bulkrax_entries_on_type"
end
Expand Down Expand Up @@ -103,8 +104,6 @@
t.integer "total_file_set_entries", default: 0
t.integer "processed_works", default: 0
t.integer "failed_works", default: 0
t.integer "processed_children", default: 0
t.integer "failed_children", default: 0
t.index ["importer_id"], name: "index_bulkrax_importer_runs_on_importer_id"
end

Expand Down

0 comments on commit 8a7fe6f

Please sign in to comment.