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

wordhero: (もっと) 軽くする #178

Open
pizzacat83 opened this issue Aug 29, 2019 · 4 comments
Open

wordhero: (もっと) 軽くする #178

pizzacat83 opened this issue Aug 29, 2019 · 4 comments

Comments

@pizzacat83
Copy link
Member

daiせんせーが謎データ構造で激軽くしてくれたけど、やっぱり辞書を常に持っておくの無駄だと思うんだよね~ crosswordにならってRustに書き直すか、事前に10000個くらい生成しておいてSQLiteでもっておくとかにしてメモリ使用量おさえたい。常にメモリは枯渇気味なので

@pizzacat83 pizzacat83 changed the title wordheroを (もっと) 軽くする wordhero: (もっと) 軽くする Aug 29, 2019
@ishitatsuyuki
Copy link
Contributor

@ishitatsuyuki
Copy link
Contributor

というか、普通にORDER BY RANDOMも害悪らしいので、何かで代替したほうが良さそう

@hakatashi
Copy link
Member

hakatashi commented Feb 28, 2021

SQLiteにインデックス貼るのは別にいいんだけど、このDBは盤面を生成するときには使われないので高速化したい場所ではないですね〜 SQLiteはゲームが終わったあと単語の説明文を取得するのに使ってるんですが、この部分は現状特に速度に関してストレスを感じてないので適当に放置してる

@ishitatsuyuki
Copy link
Contributor

検証したらautoindexが張られておりさらにORDER BY RANDOMも適切に処理してくれるらしいのでこの部分は問題ないということが分かりました。

お騒がせしました。

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

No branches or pull requests

3 participants