4 ms·
Isn't there a decent caching system behind that? OTOH, .action() could change the whole dom so that .some_selector matches something else or nothing at all, so
by Cthulhu_ 11y ago
Isn't there a decent caching system behind that?
OTOH, .action() could change the whole dom so that .some_selector matches something else or nothing at all, so I guess jquery couldn't make that assumption / optimization without knowing what .action() does, or without doing a deep analysis of what DOM elements .action() altered and whether the selector on the next line is affected.