cicscareers / 320-S20-Track1

Integration Track 1
BSD 3-Clause "New" or "Revised" License
11 stars 3 forks source link

Port methods related to profile picture to use the package #417

Open ishchhabra opened 4 years ago

ishchhabra commented 4 years ago

Due to the limitation of the response size of 6MB in Lambda functions, presigned URLs are necessary to be used to properly upload and get profile pictures from S3. While solving this, I thought to write fully functional packages to handle the backend queries. This PR is related to porting lambda functions related to profile picture upload to use that package now.

ishchhabra commented 4 years ago

While writing the package, I thought the speed might be reduced by a bit and that was an acceptable tradeoff when thinking of how structured the code would become. However, after porting a few of these methods, I realized that simple queries did had the computation increase by a very negligible amount, there was a decrease in lambda function's computation time in places where we were using very complex queries instead of many simpler ones. Such an example is get_supporters_before_match(). After porting the fill_supporterinformation method to use the package, I saw a decrease in computation time from approx 3000-4000ms to approx 1000-1500ms