The essential news about content management systems and mobile technology. Powered by Perfect Publisher and XT Search for Algolia.
The News Site publishes posts to the following channels: Facebook, Instagram, Twitter, Telegram, Web Push, Tumblr, and Blogger.
Read more https://feeds.joomla.org/~r/JoomlaExtensionsUpdated/~3/eyiYfBR9pEA/1147
Often times, website owners will find that their site running slow or their host will inform them they are using too many resources, tracking down the root cause can be a tough task. While many factors could be in play, chances are it is a poorly written script. This can be a difficult thing to track down and too often people start looking at other factors such as the hosting, their ISP or other related technologies.
Creating a great PHP application requires consideration of a lot of factors and one of such factors is speed. A good application you needs to be fast, because no one likes to wait for slow sites and if your application doesn’t load fast enough you will certainly lose a number of visitors.
When this happens the best place to start your troubleshooting is first to look at the PHP scripts and the speed of the database queries. This is where Xdebug’s Profiler tool comes in handy. Using it you can precisely determine the load times of all the elements in your script and generate an easy to interpret report.
The following article has been written by corePHP.com[1] a professional web development firm and in it you’ll be introduced to the basics of a very powerful tool designed to find slow PHP scripts and resolve the issues.
After you have downloaded and installed the Xdebug extension for PHP, you can turn on the profiler to collect information about your scripts and store the log files to your desired folder by the following steps:
• Open up your php.ini file on your server.
• Set the value of xdebug.profiler_enable field to 1.
• Set your desired folder for storing the reports by setting the output folder in the field xdebug.profiler_output_dir.
After you have set these fields, you are all good to go and the extension should start collecting information for your scripts.
Once you have collected some data and the logs are ready in your specified output directory, you can open them and analyze the data using KCacheGrind (for Linux users) or WinCacheGrind (for Windows users).
Once you open up any log file you can easily view all the functions contained in your script, how many times they are called, and how much time they are taking for execution.
Image Source: xdebug.org
The Flat Profile shows up all the functions present in the script and the time taken by each of the function to complete its task.
The “Self” column shows how much time a single function needs and the “Called” column shows how many times a function has been called in the process, while the “Function” column shows the details of the function.
This data will help you to study your scripts, make changes accordingly and speed up your script to resolve the issues that are causing your site to run slowly or consume too many resources.
In this article you were introduced to the basics of Xdebug and how it can help you with identifying scripts that are poorly coded or are taking too much resource.
###
CorePHP.com is a developer of Joomla! websites and high quality extensions. They are available to assist you in troubleshooting PHP script issues that may be plaguing your site.
Be Sociable, Share!
Read more https://blog.rochenhost.com/2014/04/optimizing-your-php-scripts-with-xdebugs-profiler/
Read more https://feeds.joomla.org/~r/JoomlaExtensions/~3/vS_y6-sRH9c/27095
npm-pkgr (GitHub: vvo / npm-pkgr, License: ISC, npm: npm-pkgr) by Vincent Voyer caches npm install
results based on your package.json
and npm-shrinkwrap.json
files.
Depending on your set up, this should reduce the time taken to deploy Node projects. The basic usage is npm-pkgr
instead of npm install
, and npm-pkgr --production
to use npm-shrinkwrap.json
.
Promised Land (GitHub: FredyC / promised-land, License: MIT, npm: promised-land) provides a way of wrapping modules with an EventEmitter
that allows you to use promises across your application.
For example, let’s say you’ve got a module that connects to a database. Once the connection is ready, it does this:
var Land = require('promised-land');
Land.emit('database:connected', db);
Any other module that needs to know when the database is ready can now do so with promises:
var Land = require('promised-land');
Land.promise('database:connected').then(function(db) {
doSomethingWithDatabase();
});
It also allows events to be repeated, in a stream-like way:
Land.stream('database:row').onValue(function(val) {
doSomethingRepeatedly();
});
The project has tests and more examples in the readme.
Stash.js (GitHub: tadeuzagallo / stash.js, License: MIT, npm: stash.js) by Tadeu Zagallo is a multilayer cache manager. That means you can define and use different storage systems for caching, based on “drivers”.
So far the author has added a driver for ephemeral storage and localStorage
support for browsers.
Cache items have methods for determining cache miss, locking, and setting values:
var stash = new Stash.Pool();
var item = stash.getItem('my/key/path');
var data = item.get();
if (item.isMiss()) {
item.lock();
data = 'example';
item.set(data, cacheDuration);
}
What lock
does here is dependent on the cache policy. There are four policies that are explained in the readme.
Read more https://feedproxy.google.com/~r/dailyjs/~3/6kR0vppmC2k/node-roundup
Phoca PDF component version 3.0.1 and Phoca PDF content plugin version 3.0.1 have been released.
Download component: Phoca PDF component download site
Download content plugin: Phoca PDF content plugin download site
Download system plugin: Phoca PDF system plugin download site
Changelog:
Read more https://www.phoca.cz/news/802-phoca-pdf-3-0-0-released-2
Page 783 of 1299