Skip to content

Commit 87c067f

Browse files
committed
chore: improve memory usage when generating on large forums/datasets
1 parent 02a2631 commit 87c067f

File tree

21 files changed

+1095
-206
lines changed

21 files changed

+1095
-206
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
js/node_modules
22
vendor/
33
composer.lock
4-
js/dist
54
.phpunit.result.cache
65
.aider*
6+
.vscode
7+
.DS_Store

composer.json

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,7 @@
3838
}
3939
],
4040
"require": {
41-
"php": "^8.2",
42-
"flarum/core": "^2.0.0-beta",
41+
"flarum/core": "^2.0.0",
4342
"guzzlehttp/guzzle": "*"
4443
},
4544
"extra": {
@@ -80,10 +79,10 @@
8079
}
8180
},
8281
"require-dev": {
83-
"flarum/tags": "^2.0.0-beta",
84-
"fof/pages": "^2.0.0-beta",
85-
"flarum/phpstan": "^2.0.0-beta",
86-
"flarum/testing": "^2.0.0-beta"
82+
"flarum/tags": "^2.0.0",
83+
"fof/pages": "^2.0.0",
84+
"flarum/phpstan": "^2.0.0",
85+
"flarum/testing": "^2.0.0"
8786
},
8887
"scripts": {
8988
"analyse:phpstan": "phpstan analyse",
@@ -107,5 +106,7 @@
107106
"psr-4": {
108107
"FoF\\Sitemap\\Tests\\": "tests/"
109108
}
110-
}
111-
}
109+
},
110+
"minimum-stability": "beta",
111+
"prefer-stable": true
112+
}

extend.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@
2828
->get('/sitemap-{id:\d+}.xml', 'fof-sitemap-set', Controllers\SitemapController::class)
2929
->get('/robots.txt', 'fof-sitemap-robots-index', Controllers\RobotsController::class),
3030

31+
(new Extend\Routes('api'))
32+
->delete('/fof-sitemap/build', 'fof-sitemap.build', Api\BuildSitemapController::class),
33+
3134
new Extend\Locales(__DIR__.'/resources/locale'),
3235

3336
(new Extend\ApiResource(Resource\ForumResource::class))
@@ -45,9 +48,6 @@
4548
->command(Console\BuildSitemapCommand::class)
4649
->schedule(Console\BuildSitemapCommand::class, new Console\BuildSitemapSchedule()),
4750

48-
(new Extend\View())
49-
->namespace('fof-sitemap', __DIR__.'/views'),
50-
5151
(new Extend\Filesystem())
5252
->disk('flarum-sitemaps', function (Paths $paths, UrlGenerator $url) {
5353
return [

0 commit comments

Comments
 (0)