forked from laravel/framework
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[9.x] Attribute Cast Performance Improvements (laravel#43554)
* Remove repeated calls to getCasts() in same method * Switch strncmp to starts_with_str Marginally faster, better readability, and matches similar functions * Add castTypeCache getCastType is called a lot when processing models with defined casts and contributes to a significant number of overall calls. Caching the results of the key conversion can result in significant performance improvement when processing large numbers of models.
- Loading branch information
1 parent
d29a524
commit 9f2005b
Showing
1 changed file
with
29 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters