Skip to content

Commit

Permalink
optimization: remove profile since unused (#321)
Browse files Browse the repository at this point in the history
Ongoing optimization by removing redundant or unused parts

---------

Signed-off-by: Andrey Borysenko <[email protected]>
Co-authored-by: Alexander Piskun <[email protected]>
  • Loading branch information
andrey18106 and bigcat88 authored Jul 10, 2024
1 parent 7820f65 commit d9a03f6
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 70 deletions.
6 changes: 0 additions & 6 deletions lib/AppInfo/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
use OCA\AppAPI\Middleware\ExAppUiMiddleware;
use OCA\AppAPI\Notifications\ExAppAdminNotifier;
use OCA\AppAPI\Notifications\ExAppNotifier;
use OCA\AppAPI\Profiler\AppAPIDataCollector;
use OCA\AppAPI\PublicCapabilities;
use OCA\AppAPI\Service\ProvidersAI\SpeechToTextService;
use OCA\AppAPI\Service\ProvidersAI\TaskProcessingService;
Expand All @@ -44,7 +43,6 @@
use OCP\IURLGenerator;
use OCP\IUser;
use OCP\IUserSession;
use OCP\Profiler\IProfiler;
use OCP\SabrePluginEvent;
use OCP\Settings\Events\DeclarativeSettingsGetValueEvent;
use OCP\Settings\Events\DeclarativeSettingsRegisterFormEvent;
Expand Down Expand Up @@ -114,10 +112,6 @@ public function register(IRegistrationContext $context): void {
public function boot(IBootContext $context): void {
$server = $context->getServerContainer();
try {
$profiler = $server->get(IProfiler::class);
if ($profiler->isEnabled()) {
$profiler->add(new AppAPIDataCollector());
}
$context->injectFn($this->registerExAppsManagementNavigation(...));
$context->injectFn($this->registerExAppsMenuEntries(...));
} catch (NotFoundExceptionInterface|ContainerExceptionInterface|Throwable) {
Expand Down
50 changes: 0 additions & 50 deletions lib/Profiler/AppAPIDataCollector.php

This file was deleted.

23 changes: 9 additions & 14 deletions tests/psalm-baseline.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@
</file>
<file src="lib/Controller/ExAppProxyController.php">
<UndefinedClass>
<code>CookieJar</code>
<code>CookieJar</code>
<code>RequestOptions</code>
<code>RequestOptions</code>
<code>RequestOptions</code>
<code>RequestOptions</code>
<code>RequestOptions</code>
<code>RequestOptions</code>
<code>SetCookie</code>
<code><![CDATA[CookieJar]]></code>
<code><![CDATA[CookieJar]]></code>
<code><![CDATA[RequestOptions]]></code>
<code><![CDATA[RequestOptions]]></code>
<code><![CDATA[RequestOptions]]></code>
<code><![CDATA[RequestOptions]]></code>
<code><![CDATA[RequestOptions]]></code>
<code><![CDATA[RequestOptions]]></code>
<code><![CDATA[SetCookie]]></code>
</UndefinedClass>
</file>
<file src="lib/Controller/ExAppsPageController.php">
Expand Down Expand Up @@ -105,9 +105,4 @@
<code><![CDATA[IEventListener]]></code>
</MissingTemplateParam>
</file>
<file src="lib/Profiler/AppAPIDataCollector.php">
<UndefinedClass>
<code><![CDATA[Request]]></code>
</UndefinedClass>
</file>
</files>

0 comments on commit d9a03f6

Please sign in to comment.