An open API service indexing awesome lists of open source software.

https://github.com/mako-framework/haste

(Experimental) Boost your application performance by running it on a application server like FrankenPHP.
https://github.com/mako-framework/haste

frankenphp mako-framework php

Last synced: 3 months ago
JSON representation

(Experimental) Boost your application performance by running it on a application server like FrankenPHP.

Awesome Lists containing this project

README

          

# Haste

[![Static analysis](https://github.com/mako-framework/haste/actions/workflows/static-analysis.yml/badge.svg)](https://github.com/mako-framework/haste/actions/workflows/static-analysis.yml)

The `mako/haste` package allows you to boost your application performance by running it on an application server like [FrankenPHP](https://frankenphp.dev/).

The performance gains will vary based on the application but a basic "Hello, world!" application will run about 4-5 times faster than on a php+apache setup.

> It is important to make sure that you do not leak data between requests by using static variables!

## Requirements

Mako 11.0 or greater.

## Setup

First you'll need to install the package as a dependency to your project.

```
composer require mako/haste
```

Next you'll have to replace the `index.php` contents with the following.

```php
Note that the example setup includes a `php-overrides.ini` file with custom OPcache settings for optimal performance. These settings should work well in most cases, but feel free to customize them as needed.

```ini
expose_php = Off
zend.exception_ignore_args=0
memory_limit=512M
register_argc_argv = Off

opcache.enable=1
opcache.memory_consumption=256
opcache.interned_strings_buffer=16
opcache.max_accelerated_files=20000
opcache.validate_timestamps=0
```