Skip to content
Snippets Groups Projects
Verified Commit efecede1 authored by Dave Long's avatar Dave Long
Browse files

Issue #3343913 by _shY, smustgrave, catch, xjm, quietone: Add comments...

Issue #3343913 by _shY, smustgrave, catch, xjm, quietone: Add comments explaining performance improvement in TypedData
parent bcf5a915
No related branches found
No related tags found
No related merge requests found
......@@ -175,6 +175,10 @@ public function getPropertyPath() {
// The property path of this data object is the parent's path appended
// by this object's name.
$prefix = $this->parent->getPropertyPath();
// Variables in double quotes used to leverage fast string concatenation.
// In PHP 7+ concatenation with variable inside string is the fastest.
// @see https://blog.blackfire.io/php-7-performance-improvements-encapsed-strings-optimization.html
// This is being done because the code can run in the critical path.
return $prefix !== '' ? "{$prefix}.{$this->name}" : $this->name;
}
// If no parent is set, this is the root of the data tree. Thus the property
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment