diff --git a/src/course_library.rs b/src/course_library.rs index 8685609..e69839c 100644 --- a/src/course_library.rs +++ b/src/course_library.rs @@ -550,8 +550,8 @@ impl LocalCourseLibrary { reader: None, }; - // Initialize the search index writer with an initial arena size of 50 MB. - let mut index_writer = library.index.writer(50_000_000)?; + // Initialize the search index writer with an initial arena size of 150 MB. + let mut index_writer = library.index.writer(150_000_000)?; // Convert the list of paths to ignore into absolute paths. let absolute_root = library_root.canonicalize()?; diff --git a/src/scheduler.rs b/src/scheduler.rs index 2abe4f1..bc1552f 100644 --- a/src/scheduler.rs +++ b/src/scheduler.rs @@ -746,11 +746,15 @@ impl DepthFirstScheduler { if let Some(superseded_by) = superseded_by { all_superseded_by.extend(superseded_by); } + let superseded_by = self.data.get_superseded_by(&candidate.course_id); if let Some(superseded_by) = superseded_by { all_superseded_by.extend(superseded_by); } } + if all_superseded_by.is_empty() { + return candidates; + } // Filter out the superseding lessons and courses with scores lower than the superseding // score.