Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Quick Installation is really slow #716

Open
kenjis opened this issue Mar 1, 2016 · 6 comments
Open

Quick Installation is really slow #716

kenjis opened this issue Mar 1, 2016 · 6 comments

Comments

@kenjis
Copy link
Contributor

kenjis commented Mar 1, 2016

If you value your time and want to get things up and running in seconds instead of minutes, you can use our quick installer instead.
http://fuelphp.com/dev-docs/#/quick_install

But in reality, now it takes long time. In my case, it took about 9 minutes. It is not quick at all.

@WanWizard
Copy link
Member

It is a lot quicker here:

real    1m46.500s

but it will greatly depend on your internet connection, and the response of packagist and github. Also, composer slows down considerably when you have xdebug enabled. Without xdebug is goes down to 0m56.222s.

But yeah, it's not a matter of seconds anymore now that we've switched to composer, and composer has to check all dependencies and clone the different repo's.

If you have any idea how it can be improved?

@kenjis
Copy link
Contributor Author

kenjis commented Mar 2, 2016

Yes, to check all dependencies and clone repos takes time. And the worse thing is GItHub API limit. Many users reach the limit, and if they are not familiar with Composer and/or GitHub, they might have a hard time. In my country, there are users who don't read English! Some users do not have GitHub account.

oil create or composer create-project is not quick. You have fast connection, but it is common it takes several minutes to install here in Japan.

I think the quickest installation is downloading the official Zip file.
Downloading it from here takes only 30 seconds. And most users have no problem with the Zip file.
They use the offical release version and do not need git repos.
They can even update fuel/core etc to next release version with using composer update command.

@WanWizard
Copy link
Member

Ok, I will have a look.

That will mean that with every release, the install procedure has to be updated, unless we can find a clever way to find out what the latest version is.

@kenjis
Copy link
Contributor Author

kenjis commented Mar 2, 2016

How about like this?

$page_url = 'http://fuelphp.com/';
$link_regex = '/<a href="(.+?)" class="button large purple download-icon">/u';
$html = file_get_contents($page_url);
preg_match($link_regex, $html, $matches);
$zip_url = $matches[1];

@WanWizard
Copy link
Member

The logic might work, but "oil create" is bash, not PHP. I have managed to handle it server side, probably easier and more reliable: http://fuelphp.com/downloads/download-link

Next challenge is that you need to be able to unzip it locally. It's not said that that is possible, so we need a solution for that as well.

@kenjis
Copy link
Contributor Author

kenjis commented Mar 3, 2016

Should oil be bash?

The following script works on Mac.

url=`curl http://fuelphp.com/downloads/download-link | sed -e 's/<[^>]*>//g'`

dir="tmp.$$"
rm -rf $dir
mkdir $dir
curl -o $dir/fuelphp.zip $url

cd $dir
unzip fuelphp.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants