ucsdscheduleplanner / UCSD-Schedule-Planner

A project to help UCSD students plan their schedules quickly and easily.
https://sdschedule.com/
MIT License
7 stars 2 forks source link

#71: Using lazy writer pattern and thread pool executor to significantly s… #74

Closed CTrando closed 5 years ago

CTrando commented 5 years ago

…peed up course scraping

dmhacker commented 5 years ago

Looks good. However, rather than manually having to close the browser (which could result in memory leaks if you run into an exception midway through the program), why don't you implement Python's try-with-resources? You can implement this through __enter() and __exit() functions. See here: https://stackoverflow.com/questions/3774328/implementing-use-of-with-object-as-f-in-custom-class-in-python

CTrando commented 5 years ago

Good idea, I have done that.