forked from GithubBackups/vichan
Optimization: Load only top 20 boards in update_boards.js
This commit is contained in:
parent
3ac3899787
commit
6e30bda41b
@ -94,6 +94,8 @@ if ($admin) {
|
||||
echo $html;
|
||||
} else {
|
||||
file_write("boards.json", json_encode($boards));
|
||||
array_splice($boards, 20);
|
||||
file_write("boards-top20.json", json_encode($boards));
|
||||
file_write("boards.html", $html);
|
||||
echo 'Done';
|
||||
}
|
||||
|
@ -14,7 +14,7 @@ function handle_boards(data) {
|
||||
|
||||
}
|
||||
|
||||
$.getJSON("/boards.json", handle_boards)
|
||||
$.getJSON("/boards-top20.json", handle_boards)
|
||||
|
||||
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user