Skip to content

Commit

Permalink
Optimize memory usage
Browse files Browse the repository at this point in the history
  • Loading branch information
berejant committed Oct 13, 2023
1 parent 8f099a3 commit c7a160f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion deletedScoresImporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ func (importer *DeletedScoresImporter) putIntoConfirmedIfSatisfy(event *dekanatE
}

func (importer *DeletedScoresImporter) pullDeletedScores() error {
lessonIds := make([]any, 0)
lessonIds := make([]any, 0, len(importer.eventQueue))
for _, event := range importer.eventQueue {
lessonIds = append(lessonIds, event.GetLessonId())
}
Expand Down
2 changes: 1 addition & 1 deletion editedLessonsImporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ func (importer *EditedLessonsImporter) putIntoConfirmedIfSatisfy(event *dekanatE
}

func (importer *EditedLessonsImporter) pullEditedLessons() error {
lessonIds := make([]any, 0)
lessonIds := make([]any, 0, len(importer.eventQueue))
for _, event := range importer.eventQueue {
lessonIds = append(lessonIds, event.GetLessonId())
}
Expand Down

0 comments on commit c7a160f

Please sign in to comment.