theapproach / approach Goto Github PK
View Code? Open in Web Editor NEWLicense: GNU General Public License v2.0
License: GNU General Public License v2.0
In Resource/Resource.php:850, the implementation of the callback function passed to spl_autoload_register
will only work for the one resource class that is passed to the __update_composer_autoloader
static method. Since each registered function will be called each time a class is auto loaded, this means the function calls will scale exponentially, in O(n^2)
time.
To test this, I added 2 global variables to track the total number of times the autoload functions are called as well as the number of times that the provided class name actually matched the resource class file that was being autoloaded. My results found that out of 25,992 total function calls, only 114 function calls were actually for the right file. 114 * 114 * 2 is 25,992 (the 2 comes from an unimportant implementation detail in the part of the code i was working on).
To fix this, the $resource_class
in the callback function should actually be derived from the provided $classname
rather than passed in via use
when the function is defined. I also found that the top level of the namespace for $classname
did not match the directory in the project root, so the namespace and directory name should probably be changed to match.
This is a test Daily Activity (code: yellow)
Current priority team activities.
Every team is expected to constantly have 2 to 5 yellow (or higher) activities in their queue.
Prioritize time-to-delivery over adding new features. Generally when working on Yellow Goals, it is better to work toward a minimum viable implementation while keeping good coding standards. Your team or layer support should already have an idea of the basic requirements.
If you see a simple all-around improvement while implementing, go ahead and try it out.
However, for notable changes, please consider suggesting ideas as a new goal on the post-climb discussion page. Harvesting new ideas into the docs lets other teams take inspiration from improvements as they happen.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.