                 }
             }
         }
-        // Process events for days with changed data
+
+        // Process events for days with changed data, sort them to load visible days first
+        let sortedChangedDays: [DayDate] = changedDayDates.sorted { (smaller, larger) -> Bool in
+            let diff1 = abs(smaller.dayInYear - self.activeDay.dayInYear)
+            let diff2 = abs(larger.dayInYear - self.activeDay.dayInYear)
+            return diff1 == diff2 ? smaller > larger : diff1 < diff2
+        }
         for dayDate in sortedChangedDays {
             self.processEventsData(forDayDate: dayDate)
         }

            }
        }

        let sortedChangedDays = changedDayDates.sorted { (smaller, larger) -> Bool in
            let diff1 = abs(smaller.dayInYear - self.activeDay.dayInYear)
            let diff2 = abs(larger.dayInYear - self.activeDay.dayInYear)
            return diff1 == diff2 ? smaller > larger : diff1 < diff2
        }

        self.eventsData = newEventsData
        self.allDayEventsData = newAllDayEvents
        for cell in self.dayCollectionView.visibleCells {

    }

    private func processEventsData(forDayDate dayDate: DayDate) {
        let calc = FrameCalculator(date: dayDate)
        calc.delegate = self
        frameCalculators[dayDate]?.cancelCalculation()
