Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.
  • How does the cache behave if you add new multi subs at runtime? Does it wipe and start over, or does it figure out which entries to clear? Similarly, if the ISA chain of any class changes at runtime, do all of the multi caches get wiped? Or do you look at the isa tree before changing it to just clear part of the cache?

    Caveat: I have not looked at the code at all yet...

    • I haven't handled the case where you add new multis at runtime yet), but yes, it'll just clear the cache for that bunch of multis. It's easy enough to do (few lines of code); it's on my task list and will be done before we merge the branch in. We don't support changing the isa chain of a class at runtime yet in Rakudo, but I expect once we do then it will just wipe all MMD caches.

      We may be able to do something smarter in the future. But for Rakudo 1.0, I'm not really interested in making doing things like changing the ISA chain on an already instantiated class an efficient operation. I'd rather spend time getting us feature complete, and if I'm going to spend time making things fast it'll be on the very common cases, not the unusual evil ones. So I won't be working on that myself anywhere in the near future. Someone else may, of course, but I don't think we have the spectest coverage yet to know that any clever optimization strategy won't cause epic breakage and hurt us later on, so IMO it's premature to try being too clever yet. I'd really rather not make us fast and wrong before we've succeeded at being been slow and right. :-)