Search results

  1. ikzann

    Feature Proposal: allow Mafia to read/write clan dungeon chat channels

    LOL. That's the last time I rely on what someone tells me about the code... Never mind!
  2. ikzann

    Feature Proposal: allow Mafia to read/write clan dungeon chat channels

    I've been working on some clan dungeon collaboration scripts, and it would be useful to have the scripts be able to use the dungeon chat channels to communicate between players. In particular, when a player gets to the I Refuse! adventure in The Heap, it is helpful for one player to let everyone...
  3. ikzann

    Bug Mafia performance

    Thanks everyone for all the help. After the PRs I've submitted, the hot spots are still mostly the same, but overall execution time seems to have been reduced (hard to measure exactly). I think there is probably some work that could be done to the maximizer, but that may be a more in-depth...
  4. ikzann

    Bug Mafia performance

    Gausie merged my changes this morning, so I ran the 4:1 ratio benchmark against both r26905 and r26907. I still saw a 4-5x speedup or so as the old code also slows down substantially with the corrected benchmark. That's good enough for me. This is also only CPU time - obviously folks with...
  5. ikzann

    Bug Mafia performance

    Thanks. I'll rerun the tests.
  6. ikzann

    Bug Mafia performance

    That's fair. It is true that a big part of the "problem" (to the existent there is one) is saveSettingsOnSet - there are now quite a few preferences that update every combat. I am going to explore turning it off, or triggering a write once per adventure, in some of the scripts I work on. I...
  7. ikzann

    Bug Mafia performance

    Okay, after the work this weekend there is still one major outstanding question I'd like to ask folks: should we switch preferences from using a sorted TreeMap to an unsorted HashMap-style? Mafia currently spends a nontrivial amount of time doing its in-memory preference lookups - maybe 8-10%...
  8. ikzann

    Bug Mafia performance

    I have a couple PRs in now to at least ameliorate some of these issues. Still looking at a few other candidates for low-hanging fruit for improvement.
  9. ikzann

    Bug Mafia performance

    Ah, but create() inside a script must rely on the database? Hm.
  10. ikzann

    Bug Mafia performance

    Interesting. That's all extremely helpful context. Your comment about adventure() makes a lot of sense - there is no reason to refresh the model driving the UI when most of the UI is locked, anyway. The same logic would seem to apply to scripts. If a user is running a script, is there any reason...
  11. ikzann

    Bug Mafia performance

    Here is a mafia performance snapshot - you should be able to open it in Java VisualVM. This is on the branch for PR #1227. There still appear to be lots of concoction databases refreshes happening in the main code path. https://www.dropbox.com/s/29md3hjpvf9z02d/mafia-snapshot.nps?dl=0
  12. ikzann

    Bug Mafia performance

    Hi all, After getting a little frustrated with how quickly Mafia chews up my laptop battery, I decided to run it through a profiler to see what seems to be generating the most CPU usage. Below are some quick highlights from a first run while running a farming script, and I'd be happy to dive...
  13. ikzann

    Bug - Fixed After a free rest in Chateau Mantegna, Mafia assumes you have no more free rests

    I have a PR up at https://github.com/kolmafia/kolmafia/pull/1162 and just need to finish the tests. Bizarrely, the chateau_restbox action works for both free and non-free rests - which action fires depends exactly where you click on the bed/text in the Chateau.
  14. ikzann

    User-submitted PRs

    Hi Veracity, Just to double check, did you fork the project first? Since you don't have direct permissions to push to main on that repository, you will have to push to a fork of the project and then file a PR across repositories. That's how contributors to Mafia who don't have commit access...
  15. ikzann

    Bug JavaScript bugs

    We should fix the ultimate exception not being caught, but these are currently catchable in JS: > jsq Item.get("sword") Internal exception: Wrapped net.sourceforge.kolmafia.textui.ScriptException: Bad item value: sword (command line#1) at command line:1 Unexpected error, debug log...
  16. ikzann

    Bug JavaScript bugs

    This is unfortunately a tricky limitation to work around in the JS-to-Java-to-ASH conversion chain and any fix is going to be a little bit of a hack. I'd recommend using TypeScript to avoid typing issues like this. I will think about how to fix this particular issue.
  17. ikzann

    Bug JavaScript bugs

    Here's a fix for the value conversion issue that philmasterplus was seeing, test with js Monster.get(33).phylum === Phylum.get('undead')
  18. ikzann

    Bug JavaScript bugs

    Yes, I meant merge them both in sequence.
  19. ikzann

    Bug JavaScript bugs

    Can someone merge those two patches?
Top