{"push_id":1143167680,"size":1,"distinct_size":1,"ref":"refs/heads/jcr-use-receiver-mixin","head":"a53588e776f7f7db5b4df2d82f6e6972a232fe71","before":"c8488037f4fb2f53333875afb8deaa1cf57eaa5e","commits":[{"sha":"a53588e776f7f7db5b4df2d82f6e6972a232fe71","author":{"name":"Collin Redding","email":"d46f375d8aaf6893782d4503835b61ef3c034b5b@gmail.com"},"message":"Speed up included hook, remove global list of receivers\n\nThis speeds up a plugin's included hook by changing the how it\ndetects if its been included or not. As part of this, the list of\nreceivers that each plugin stored has been removed as it is no\nlonger needed. Overall this doesn't change the core functionality\nof much-plugin.\n\nThis changes how a plugin detects if its been included or not.\nPreviously, it would see if its been added to a list of receivers\nthat it stored and if not, it would add itself and run its hooks.\nNow, it uses an included detector mixin that is unique to the\nplugin. Since the plugin controls when this mixin is included, the\nplugin can check in its included hook if its detector mixin has\nbeen included. If not, include it and class eval its plugin hooks,\notherwise do nothing.\n\nThis makes plugin inclusion much faster and avoids a global list\nof receivers that can build up. Typically, the list of receivers\nshould only be a handful of objects but if much-plugin is used with\nan algorithm that creates anonymous classes then the list of\nreceivers can grow to a very large array. Furthermore, the array\nkeeps the classes from being garbage collected because it is always\nholding a reference to them.\n\nThis also adds a bench script for comparing much-plugin's\nperformance with a regular mixin. Using much-plugin should always\nbe slightly slower but it should be a fairly insignificant\namount (about 1/10th of a millisecond on 10,000 iterations).","distinct":true,"url":"https://api.github.com/repos/redding/much-plugin/commits/a53588e776f7f7db5b4df2d82f6e6972a232fe71"}]}
{"actor":{"display_login":"jcredding"}}