inertia-laravel icon indicating copy to clipboard operation
inertia-laravel copied to clipboard

[2.x] Replace md5 with xxhash

Open RobertBoes opened this issue 1 year ago • 1 comments
trafficstars

Another attempt of #652

I recently noticed laravel/framework#52301, where most of the md5 calls will be replaced with xxhash, which is much faster than md5. For Inertia's asset versioning we don't need it to be cryptographically correct, but a performance improvement would be nice, especially since the middleware is executed on every request.

I think it's save to change this in the Inertia adapter, since all it would do is force a reload, which would happen when updating assets anyway.

Support for xxhash was added to PHP 8.1 (https://php.watch/versions/8.1/xxHash), so we can safely use this algorithm instead of md5.

RobertBoes avatar Aug 09 '24 12:08 RobertBoes