PHP#7.4 with Xdebug profile reporting page speeds much faster than Apache Benchmark tool (ab) - xdebug

I'm using mac osx brew php-fpm#7.4-debug with Xdebug profiling to profile a web applications performance.
I'm running into an issue where the Xdebug profiler is reporting a page load time of only 1.5 seconds but when I do an apache bench test using ab -n 9 -c 3 [my_web_app]/ the average page load time is over 4 seconds, it also takes 4 seconds loading in the browser as well.
What are some reasons why the profiler would not be picking up these missing 2.5 seconds in the page load?

Related

DBT after upgrade has decreased/slower performance when running "dbt run" command

After dbt upgrade on our project (dbt-core==1.0.4 -> dbt-core==1.3.2) I observed huge performance decrease when models are built. Basically, our 84 models would run for 1h20min with 1.0.4 version, but it runs without an end with version 1.3.2.
I have checked for any breaking changes between the versions, but haven't found a clue why the performance issue occurred. I would greatly appreciate any advice what to check/change.
Some information:
we have 258 models, 3104 tests, 7 snapshots, 0 analyses, 16 seed files, 190 sources, 0 exposures, 0 metrics. Process running models (dbt run) is the main issue, as it doesn't go through due to performance decrease.
It seems like with every next model it takes longer for it to process. First ~10 models run with the same time as with version==1.0.4, but as long as the process goes, the worse performance gets. Simple model that is being built as #33 model would take 10 seconds with version 1.0.4, however it takes over 3000 seconds with version 1.3.2
we use SQLServer db engine with dbt-sqlserver==1.3.0 adapter for 1.3.2 version.
Performance decrease is observed on both our servers and on my local testing environment, which would imply there is something wrong with our dbt project, not the machine itself.
We use 2 threads and ODBC Driver 18 for SQL Server driver.
I compared SQL Scripts generated by dbt between 1.0.4 and 1.3.2 versions and they were with no changes.
I have studied the release notes for dbt-core and dbt-sqlserver releases but haven't found a clue what change could decrease the performance. I've also tried upgrading to lower versions (1.2.X) but it resulted with the exactly same huge performance decrease.

React.js starting on development server or creating production build requires to wait long time?

When starting react.js in development it needs like 3 or 5 minutes to load. The time varies, after it's started it refreshes fast enough on changes...
Also when doing production build it takes a lot of time.
What could cause this?
There are some huge components some are like 500~ lines there are some of components that has ~2k lines.
Could huge components cause this?
First update - tried to start react app in development 4 times today.
First start in development took 4 mins 10 sec.
Second start in development took 3 mins 12 sec.
Third start in development took 2 mins 30 sec.
Fourth start in development took 2 mins 35 sec.
Also tried to build production build and look how long it exactly takes.
First production build - 7mins 27seconds.
Second production build - 3mins 41 seconds.
Third production build(removed all build files) - 3mins 34 seconds.
Also those big components who has from 500 to 2k lines of code are not my design choice. When I joined project I just found it like that. Now I am just figuring out is it okay that it takes such period of time to start development server for react.
Output message when build finished:
File sizes after gzip:
2.37 MB build/static/js/2.6d79667f.chunk.js
72.79 KB build/static/css/2.37cd983e.chunk.css
52.85 KB build/static/js/main.375a34e0.chunk.js
2.17 KB build/static/css/main.5827d774.chunk.css
796 B build/static/js/runtime-main.a4023761.js
The bundle size is significantly larger than recommended.
Consider reducing it with code splitting: https://github.com/facebook/create-react-app/blob/master/packages/react-scripts/template/README.md#code-splitting
You can also analyze the project dependencies: https://github.com/facebook/create-react-app/blob/master/packages/react-scripts/template/README.md#analyzing-the-bundle-size
The project was built assuming it is hosted at http://localhost:5050/.
You can control this with the homepage field in your package.json.
The build folder is ready to be deployed.
Find out more about deployment here:
https://github.com/facebook/create-react-app/blob/master/packages/cra-template/template/README.md
This happens when your app has more components along with static contents. When you also build react js production it does take time to build an optimized build. You can follow below link for optimization:
https://medium.com/front-end-weekly/optimizing-loading-time-for-big-react-apps-cf13bbf63c57
Not exactly, I think the server is fast but if you are doing the production build it will take some minutes, depends on how much code you have, if it's your hello world and it doesn't charge I think something is bad

PageSpeed Insights: poor both mobile and desktop

I am not a programmer nor developer and although I followed the links on Google to remove the problems it showed, I do not understand a thing. Therefore I would like to ask you to tell me in some comprehensible words what I should do to rectify the optimisations so that the speed of my pages is as it should be.
UPDATE
Reduce server response time
Your web server is TOO SLOW!
Getting a better ISP/Host is the easiest way to significantly speed up your page. This will speed things up about 10X. All those 600-900ms response times in the waterfall should be one tenth the time.
For example your style.css takes only 7 ms to download the file, but the server waited 632 ms to send the first byte. This is almost a 100X unnecessary delay.
URL: https://moreyouthfulskin.com/wp-content/themes/wellness-pro/style.css?ver=1.0.0
Loaded By: https://moreyouthfulskin.com/en/home/:59
Host: moreyouthfulskin.com
Request Start: 5.951 s
Time to First Byte: 632 ms
Content Download: 7 ms
Bytes In (downloaded): 7.9 KB
Uncompressed Size: 36.9 KB
Bytes Out (uploaded): 0.2 KB
This above data is from this link: Web Page Performance Test for https://moreyouthfulskin.com/en/home/
Leverage browser caching
The 1 day cache is not a big deal, it is a small issue. It is more of a warning. It is a web server setting. It is not worth much effort when you have so many other serious issues.
Eliminate render-blocking JavaScript and CSS in above-the-fold content
The CSS after the JS is big. This is usually caused by WP plug-ins. Only use plug-ins that do not degrade performance. Check your page speed be and after installing any plug-in. Then think about whether it is worth it.
Remove or at least speed up the redirects.
Your redirects are costing you because your web server is too slow. Get a new ISP. The two redirects took over 5 seconds. This means there is an unnecessary 5 second delay before the page even begins to load the first byte of the home page.
Optimize images, Minify JavaScript, and Minify CSS
At the bottom of Google Pagespeed results there is a link to Optimized images, Minified JavaScript, and Minified CSS. Download them, then upload them to the proper directory/folder on your server. This one is easy. If you cannot do this then you are in this way over your head.
END OF UPDATE
Your biggest issue is you have CSS and fonts being loaded after the JavaScript. This is costing you about 5 seconds load time.
Also your page load had two redirects using 2 seconds.
Your server needs to be configured to use a longer max-age cache .
Curently your cache is 14400 seconds. cache-control: public, max-age=14400

What is the expected page generation time for simple page in symfony 2 sonata?

Hey guys I'm playing with sonata and trying to create a simple backend for a few related models. But my pages are generated in about a second for quite a simple page.
http://i.imgur.com/VPLII4B.png
Most of the time takes twig templates processing. But event on simple non-sonata pages (in this project) it takes quite a while to generate a page http://i.imgur.com/Se376oi.png
I wrote a simple twig extension to measure time in prod env and it doesn't actually differ much from dev.
I have quite powerful laptop (i7 - 8 cores with 8 gb ram, NON-SSD 7200 rpm hard) and I even tried to deploy the project on the powerful server and the time also didn't differ much (about 10-15%).
Am I doing something wrong? I use php 5.6 on local machine with opcache enabled
opcache.enable=1
opcache.enable_cli=0
opcache.memory_consumption=400
opcache.max_accelerated_files=10000
What is page generation time for your real projects?

NHibernate or SQL Server 2008 performance issue

I have a problem with web app I'm currently working on. This app is a kind of customization of Umbraco 5 CMS. The problem is that it runs well on my machine and other developer's machine but stack at production environment. When I try to browse it I get "Request Timeout" error.
I tried to analyze this site with dotTrace on both local and production sides. And I've figured out that the problem is in some method "()" which is called by SNINativeMethodWrapper.SNIReadSync method.
Here is the screenshot from dotTrace: (hot spots screen)
At the dev machine the same number of this method calls takes two times less then on the prod server.
What can be the reason for this?
Umbraco 5 development was ceased as there were significant performance issues with Version 5, related in part to the use of nHibernate
Here is a breakdown of some of the issues with version 5's implementation: http://ayende.com/blog/156577/on-umbracorsquo-s-nhibernatersquo-s-pullout
Umbraco are now focusing on updating version 4 and will soon release version 6 (on which performance is excellent!)

Resources