Traewelling / traewelling

Free check-in service to log your public transit journeys
https://traewelling.de
GNU Affero General Public License v3.0
231 stars 46 forks source link

Improve performance of ICS Generation #1237

Closed MrKrisKrisu closed 1 year ago

MrKrisKrisu commented 1 year ago

In PR #1236 I removed the eager loading of the ICS generation, because "HafasTrip" was always null in prod. In my dev environment everything is working well. We need to reimplement eager loading beacuse the loading time and amount of db queries are too much now.

    I'll merge this as a hotfix, even when the ics generation loading time will (and the amount of db queries) are increased then. I'll open an issue for this.

Originally posted by @MrKrisKrisu in https://github.com/Traewelling/traewelling/issues/1236#issuecomment-1346432831

MrKrisKrisu commented 1 year ago

https://github.com/Traewelling/traewelling/blob/c703cc5679a50cce26b05fc44058f14dcfcf057a/app/Http/Controllers/Backend/IcsController.php#L30-L31

MrKrisKrisu commented 1 year ago

ah, I can close this. Eager Loading was recently integrated back. ICS generation is not that fast, but... better then before.