Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I'm currently optimizing an application's login process' caching and I'm thinking of using a File based approach, but I'm not so sure if it's the best when it comes to speeding things up. So among the following approach, which would greatly improve my application?
PHP_SESSION
Filebased(physical file)
PDO_Database
FTP
Anything that touches files is less optimal for caching than when staying in memory. Respectively anything that goes via a network is generally even slower. So when it comes to speed you're probably best off using the PHP_SESSION.
Do note however that because it is memory based you also lose the cache when the application or the server is restarted. If this is undesired you should probably go for a file based solution.
Related
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
I was wondering which is the most efficient. Assigning 7 session variables when the user is logged in or passing the user ID and making new sql queries when the information is needed. I want to cater for mobile users with low download allowanaces as well and we don't have free wifi around here.
PHP is all done server side so I don't think there are any considerations here for mobile users, other than the usual ones such as keeping the page downloads small and accessible. In other words, the server resources are the bottleneck here, so go whichever way you like! Generally speaking storing values (caching) is going to be faster in terms of processing, but could use more memory than fetching stuff as you need it.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I have a lot of .php and/or .php files on my site. Is there a way to go through each site/page and work out which ones(if any) have errors in the console in the broswer?
More generally, I am looking at making a change to many pages on my site and I am just wondering what is the best way to automate the test process to see that I did not break anything with the changes I made.
Note: the errors in the console in the broswer, will give me errors, but it would not show errors that only the human eye could detect.
Have you considered an automated testing framework?
http://matthewdaly.co.uk/blog/2012/11/03/testing-php-web-applications-with-cucumber/
Repetitively manually testing ur site is not fun.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I have a website run by php. I have about 80 users that will be signing up within a hour period.
my question is are there any problems that could occur when having lots of people accessing my database all at once?
I mean 80 users is a lot for me, and if some of you people that have way more than that are laughing at me, how many people would it take to mess up a database?
Thanks in advance!
You could use a tool like apachebench to check. Then you could use tools like memcached (or memcachedb if you needed persistence) to dial down the mysql queries. I would also set up mysql slow query logging.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
I have been building an application, in my spare time, for a while now and have been thinking about how to protect my product from piracy (it will be something that the customers will have on their server).
I have been checking out the various encryption products around and they seem to be do the trick.
But, I how much will it slow down my site?
It is currently not possible to let encrypted general programs run on customer machines (see On the (Im)possibility of Obfuscating Programs by Barak, Goldreich, Impagliazzo and Rudich).
What you probably mean is code obfuscation which is not encryption in any way. Most likely there is no performance hit when you use them in the same way as JavaScript runs in the same way when minified.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
I'm currently working on a project that uses MySQL for configuration, but now I'm starting to think it could slow down page loads.
So my question is, would it be better to store configuration options (that are read almost every page load) inside an XML/JSON file, or a MySQL database?
Thanks.
One thing to conside is how much config data there is, and perhaps how often it is likely to change. If the amount of data is small, then saving this in a database (if your not already using a db for anything else), would be overkill, equally maintaining a db for something that gets changed once every 6 months would probably be a waste of resources.
I think this depends on your projects. If you want someone else to configure the application through the UI you can put the configurations into the database.
If its just you and some developers, and changes are not made frequently, put them in a file.