Skip to content

Commit f3d2d9a

Browse files
committed
minor #386 Minor performance optimizations (javiereguiluz)
This PR was squashed before being merged into the master branch (closes #386). Discussion ---------- Minor performance optimizations * The purpose of the Symfony Demo is not to build a fast Symfony app, but to showcase how to develop Symfony apps. However, we should optimize the things that make sense and not complicate the application much. * We're not sending emails, so we can stop loading the Swift bundle. * We're promoting Assetic less and less ... so we could stop loading Assetic bundle too. Sadly we can't remove Assetic entirely yet because there is no clear alternative (maybe stop using SCSS and just use some simple CSS and JS files?). Commits ------- e2264b0 Minor performance optimizations
2 parents d8ecd9f + e2264b0 commit f3d2d9a

File tree

3 files changed

+11
-10
lines changed

3 files changed

+11
-10
lines changed

app/AppKernel.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@ public function registerBundles()
1616
new Symfony\Bundle\SecurityBundle\SecurityBundle(),
1717
new Symfony\Bundle\TwigBundle\TwigBundle(),
1818
new Symfony\Bundle\MonologBundle\MonologBundle(),
19-
new Symfony\Bundle\SwiftmailerBundle\SwiftmailerBundle(),
2019
new Doctrine\Bundle\DoctrineBundle\DoctrineBundle(),
2120
new Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle(),
2221
new WhiteOctober\PagerfantaBundle\WhiteOctoberPagerfantaBundle(),
2322
new CodeExplorerBundle\CodeExplorerBundle(),
2423
new AppBundle\AppBundle(),
25-
new Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle(),
24+
// uncomment the following line if your application sends emails
25+
// new Symfony\Bundle\SwiftmailerBundle\SwiftmailerBundle(),
2626
];
2727

2828
// Some bundles are only used while developing the application or during
@@ -34,6 +34,7 @@ public function registerBundles()
3434
$bundles[] = new Symfony\Bundle\WebProfilerBundle\WebProfilerBundle();
3535
$bundles[] = new Sensio\Bundle\DistributionBundle\SensioDistributionBundle();
3636
$bundles[] = new Sensio\Bundle\GeneratorBundle\SensioGeneratorBundle();
37+
$bundles[] = new Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle();
3738
}
3839

3940
return $bundles;

app/config/config.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,9 @@ doctrine:
7474
auto_mapping: true
7575

7676
# Swiftmailer Configuration (used to send emails)
77-
swiftmailer:
78-
transport: "%mailer_transport%"
79-
host: "%mailer_host%"
80-
username: "%mailer_user%"
81-
password: "%mailer_password%"
82-
spool: { type: memory }
77+
# swiftmailer:
78+
# transport: "%mailer_transport%"
79+
# host: "%mailer_host%"
80+
# username: "%mailer_user%"
81+
# password: "%mailer_password%"
82+
# spool: { type: memory }

app/config/config_test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ web_profiler:
1212
toolbar: false
1313
intercept_redirects: false
1414

15-
swiftmailer:
16-
disable_delivery: true
15+
# swiftmailer:
16+
# disable_delivery: true
1717

1818
# It's recommended to use a separate database for tests. This allows to have a
1919
# fixed and known set of data fixtures, it simplifies the code of tests and it

0 commit comments

Comments
 (0)