Maximally optimzed way of detefting when a player is in a cobweb

I thought of an advancement that checks "movement affected by", but there isnt a direct advancement for this (except tick, which I'm nkt sure how optimized it is). I aslo thought of "enter block" trigger. I'd appreciate any advice

Continue to help post