Sylius works very slow - performance

I installed Sylius on XAMPP (localhost) and pages load very slowly.
I don't know where I can find configuration to solve my problem.
Please help

It will be probably just you environment settings, as well as in this question https://stackoverflow.com/a/17474117/1984346
Try using it with app.dev instead of app_dev.php for a quick check
If it will help, you got you culprit and follow the answers and links bellow.
why is it slow: quote from above answer:
you are by default installing using the config_dev.yml .... When debug is on "cache files are dynamically rebuilt on
each request." This is what is causing the slow speed.
For more information about enviroments: http://symfony.com/doc/current/cookbook/configuration/environments.html

This is a common issue for projects base on symfony framework, sylius out from the box don't take care about the performance.
First is follow the https://symfony.com/doc/3.3/performance.html
Next, more complex is using the Varnish proxy cache.
Also, use elastic search for the catalog, product view pages.
Last one is get rid from the coupled frontend part, but use only API side, where fronted build on top of Angular, React or Vue js frameworks.

Related

Server side rendering or pre-rendering in Laravel and Vuejs

I have a web application in Laravel 7 and Vuejs2 which have some pages like home, about, cities and help. these page need to be crawled by search engines.
I have tried both ways, prerendering and server side rendering without success.
for pre-render there is only one package prerender-spa-plugin which is very old and not updated since 5 years.
server-side-rendering is also difficult because my web app is already designed and is going to production, it is hard to implement that now, and also not recommended to implement server-side-rendering because of 5 pages.
any suggestion are appreciated to make these 5 pages crawelable by search engine.
update:
my application contain other pages and components which do not need to be SE optimized, pages like user account and profiles.
Overall, I recommend the usage of Nuxt if you want something that could deliver a professional experience, on top of managing all the flexibility that you wish to have with an SSR/SSG tool.
Here is a more detailed answer regarding your currently available tools to achieve some SEO-crawlabale content: https://stackoverflow.com/a/69075962/8816585
You mentioned that you wished to keep some pages as SPA-only, this is also feasible thanks to the generate.exclude key of the configuration: https://stackoverflow.com/a/66472634/8816585

Laravel Google tag Manager

Good day to all.
I connected the tag manager to the site, but I want to be sure that it is on all pages.
This is an online home appliance store.
I want to understand the Laravel principle, how can I find all the pages?
Help me figure out the code
Thanks in advance.
For a quick check, I normally use http://www.gachecker.com/ Very useful, it not only indicates absent libraries, it also indicates double libraries. Pretty useful.
You can implement basic pageview tracking through GTM and in a few days see if there are missing pages in Analytics report.
You could use your sitemap or access log (grouped by page path) to check it manually or with a site crawling tool.
Finally, sure, you can go through Laravel's page templates and make sure GTM is referenced in each. I'm not an expert in PHP frameworks though.
If you want to see Laravel-only solution, you should ask your question with no reference to GTM.

Any clean way to avoid gstatic in Laravel?

I have the latest Laravel (8.5.9). I've noticed all my visitors will use gstatic (Google site for some caching), but I would like to avoid this behavior (I don't want to use any other web site or application than mine).
Gstatic is called by Illuminate (/vendor/laravel/framework/src/Illuminate) and also some fonts (/public/assets/fonts/google.css).
Please, do you have any clue to avoid this behavior ? Thank you.

Magento 1.8 and Varnish or another FPC

As we all really know, there appears a little problem with Magento 1.8.x and Varnish. Magento team added the support "form_key" for the most the frontend forms and actions. It is really great, everyone should keep safety first. However it causes a problem with FPC systems as Varnish (great article about this is here http://www.supportdesk.nu/blog/110-magento-1-8-form-keys-impact-on-fpc). Many FPC systems on Magento solves it by putting a placeholder and replace "form_key" during loading a page from cache. It's good for PHP systems that are integrated into Magento , but not for external systems as Varnish. So my question is as follows:
Is there a good enough solution for using FPC as Varnish and Magento 1.8.x?
I consider follows
1) prevent using of the "form_key" on frontend, there are many way to do this (e.g: https://bitbucket.org/supportdesk_nl/turpertine-formkey-workaround/src/574ff1851618dc0e76e4274001fbf3efb89c99f6/app/code/community/SupportDesk/CartFormKey/Model/Observer.php?at=master). However this is hack and is not good generaly. Moreover could be a security risk? What do you mean about this?
2) load the "form_key" via AJAX and replace all links and form inputs by JavaScript code. I'm not sure that it is technicaly realizable (e.g: replacing code snippets like onclick="setLocation('....&form_key=XXX');" would be too difficult) and it will causes too many problems and incompatibilities with various extensions.
3) do not use Varnish. Yes it would be a solution, but let's avoid them for now, please.
4) Your suggestions ???
Many thanks for your answers.
Which FPC are you trying to use anyway? We use Lesti FPC (with Redis Cache backends, and session backends) with Varnish and it works fine.
I don't know if you've properly read one of the links you posted, but Lesti FPC is already patched via this commit, 5 months ago.

Magento module admin 404 after move to a new server

I've been devolving several Magento modules on a Mac's local Apache server. Lately, I've moved the modules to a new Magento install on a new server. My problem is that all but one is 404-ing when I'm trying to load their admin pages. I can't find any reason why this one module works and the others don't even try to load pages. Most if the code is very similar from one to the next. Also, the 404 pages are not helpful and there are no exception or log entries to help me. These all work on the old server, and although some of the code has bad/old links that need to be fixed, and those generate errors I see no reason they aren't trying to load pages and generating errors.
I think the configs work, because I get the admin menu. Since the layouts have nothing concerning the front part of URL's, I see no reason for the problem to be them, either. I could post code, but I have no idea what to post that could be causing this.
I would greatly appreciate any insight that could be causing this.
When i devolve modules on windows and send to Linux, sometimes forget and make some thing on capital letter and others on lowcase, windows isn't case sensitive on this case, but linux is. maybe is the same on Macs / Linux

Resources