0
0
Fork 0
EnglishPal/app
Lan Hui 1b211f107d Speed up loading next article
The key change is replacing "d1 = load_freq_history(path_prefix + 'static/frequency/ferquency.p)" with "d1 = load_freq_history(user_word_list)"
in function get_today_article() from Article.py.  Now, with a user_word_list of size about 500, the next article can be loaded within 100ms.
The new d1 is much smaller than the old one, therefore the following computation "d3 = get_difficulty_level_for_user(d1, d2)" is much faster.
The students did not feel that loading next article is slow; this is because their frequency.p is quite small.

Also log information in app/log.txt
2023-08-11 11:59:48 +08:00
..
db Create folder app/db with a README file. 2023-08-10 15:25:42 +08:00
layout/partial Repalce old app folder with SoftArch王炫/english-pal-master/app/ 2022-01-26 21:10:09 +08:00
model 解决程序源文件更新了,但是 docker container 中的程序源文件没有更新的问题 2023-08-10 14:19:37 +08:00
static (1) Downgrade Flask version from 2.3.2 to 2.0.3 as installing the higher version reports errors. This is probably due to my outdated python version (3.6). (2) Persist SQLite database data in a docker volume. Created a docker volume called englishpal-db using command 'docker volume create englishpal-db' and associate this volume with the docker image file directory /app. So, now what happens in /app will be mirrored to englishpal-db. Where is englishpal-db located? Use command 'docker volume inspect englishpal-db' to find out. 2023-07-17 07:45:38 +08:00
templates Highlight user difficulty level too. 2023-08-10 19:12:30 +08:00
test [REFACTOR] user_service.py: Added id to user name, word and frequency for click to execute AJAX request in JS (#30) 2022-07-18 13:29:04 +08:00
Article.py Speed up loading next article 2023-08-11 11:59:48 +08:00
Login.py refactor: remove sql sentences 2023-04-18 21:50:54 +08:00
UseSqlite.py Use named style for sqlite3 execute() 2022-01-27 17:01:03 +08:00
WordFreq.py Publish EnglishPal source code 2021-04-06 16:22:03 +08:00
Yaml.py build.sh: deploy the new code 2022-02-05 22:59:45 +08:00
account_service.py Update flask version in requirements.txt, use escape from markupsafe package. 2023-07-14 09:11:02 +08:00
admin_service.py Update flask version in requirements.txt, use escape from markupsafe package. 2023-07-14 09:11:02 +08:00
difficulty.py difficulty.py: add some stop words, hoping that getting the next article can be faster. 2023-05-24 10:12:44 +08:00
main.py Speed up loading next article 2023-08-11 11:59:48 +08:00
pickle_idea.py Update pickle_idea.py 2021-05-31 08:48:03 +08:00
pickle_idea2.py Change from bug359-zhangkeli 2023-04-25 08:40:26 +08:00
user_service.py Speed up loading next article 2023-08-11 11:59:48 +08:00
wordfreqCMD.py 已经与Alpha-snapshot20230525 分支同步,重新提交 2023-05-28 16:31:12 +08:00