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
Searching (WIP) #231
Searching (WIP) #231
Conversation
|
@Mrmaxmeier I recently changed how the game-store passes data down to the app-store (since 0.11.0), so you might want to take a look at that first |
|
lemme get the icomoon one for you |
c8638e1
to
00e167c
Compare
|
@Mrmaxmeier re throttling API calls, it's already handled in |
1500605
to
525d260
Compare
|
@fasterthanlime Can you take a look at the current state of this PR? Pagination isn't ready yet, because the API doesn't return the total amount of search results. |
|
Ah Max, the interaction looks neat! I agree that the UI needs some work Anyway I'm currently focused on i18n+preferences with matias, but will take On Wed, Dec 23, 2015, 00:01 Mrmaxmeier notifications@github.com wrote:
|
|
I've been thinking about this a lot lately and the main issue for me is that we can't cache all search results in the db - it'll get too big. We need a way to mark these game records as "transient" and be able to garbage collect them when we don't need them anymore. I haven't yet found a reliable way to do that, there's a lot that can happen. For example let's say we had a Whenever we garbage collect the DB, we could see if the tab is still open and remove records whose tabs have been closed - but what if the game has been installed since? Or added to a collection? We need a way to check that too. Maybe the DB garbage collection routine should first collect all game IDs from collections, owned, etc., so that it knows what not to delete - and then we don't even need |
| AppActions.search_fetched(query, game_ids, games) | ||
|
|
||
| if (fetched < total_items) { | ||
| await fetch_search_page(query, page + 1, games) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, we probably shouldn't fetch all search pages in one go - as opposed to collections which we want to have available offline
|
I want to bring this PR and #328 into master so it doesn't bitrot again, but hide it behind environment variables until it's ready. |
|
Discarding all data that isn't visible to the user sounds like it's the best option considering backwards (and forwards) compatibility. Adding There are a few options for triggering the gc:
what do you think? |
I didn't know about it! (docs page), sounds interesting I was thinking of triggering the GC on tab closes & startup |
ab3fec0
to
81c5fd1
Compare
81c5fd1
to
ad15b06
Compare
|
@Mrmaxmeier finally merged this, already works quite well! Will make a few changes I think. |

🚧 WIP
To-dos
ENABLE_SEARCH=1