Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CalendarServiceDataFactoryImpl is a memory hog #59

Open
marcioaguiar opened this issue Sep 11, 2015 · 0 comments
Open

CalendarServiceDataFactoryImpl is a memory hog #59

marcioaguiar opened this issue Sep 11, 2015 · 0 comments

Comments

@marcioaguiar
Copy link

I went through some performance problems and high memory usage when using OpenTripPlanner before. But recently I was using only onebusaway-gtfs to read a GTFS into memory and found it to be inviable because of the implementation of CalendarServiceDataFactoryImpl.

A simple GTFS was consuming more than 1Gb of memory to boot (not sure how much more it would go because the system throws OutOfMemory before it ends). Investigating the cause of the problem I found out that CalendarServiceDataFactoryImpl has a pretty naive implementation, storing all operation dates of all trips in memory.

In my application the operator can create trips with no end date planned. I store this trips with an end date in the year 3000. That generates almost 360.000 instances of Calendar for each Trip.

I am sure there is a more efficient way to implement the calendar service. Are there plans to improve this service?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant