perf(search): Cache building list at startup to speed up search#82
Conversation
…very search Previously the building list was fetched from the backend every time the search button was tapped. Moved the fetch to app startup and stored it in a global variable, reusing it in the search sheet to make search instant.
|
yeah maybe we should add it to gitignore? but i wonder if it'd even compile |
|
Sorry, I thought I needed to make those changes to run the app on my device locally. I have reverted them back to the original values. |
kurz3m3
left a comment
There was a problem hiding this comment.
Please verify that the app runs as intended before you commit or PR anything. You should also be looking at the files that you change, if the file isn't in the lib folder then you most likely edited something you shouldn't be committing...
Revert the changes you did to the files in the ios folder and we can take a look at it after that.
| ); | ||
| MARKETING_VERSION = 2.0.0; | ||
| PRODUCT_BUNDLE_IDENTIFIER = com.ishankumar.maizebus; | ||
| PRODUCT_BUNDLE_IDENTIFIER = com.siddhant.maizebus; |
There was a problem hiding this comment.
Hey, you didn't fix all the changes you made in this file. Please revert all the changes done to project.pbxproj
The map will not display otherwise. Please make sure you test and verify that the app is working before you commit or pull request anything...

Description
Previously, the building list was fetched from the backend every time the search button was tapped. Now it is cached at startup in a global variable and reused in the search sheet, making search snappy.
Type of Change
feat)fix)Changes Made
globalBuildingLocstoglobals.dartto cache buildings in memory_loadStopsForLaunchinmap_screen.dartto fetch buildings at startupsearch_sheet_main.dartto use cached data instead of fetching on every searchTesting Done
Flutter:
Checklist
[type](scope): short descriptionmainand is our current working update branchprint()/debugPrint()/console.log()left in production code