Feature - Implemented "modernize" item manager tables

slyz

Developer
I thought it was nice, then I found the button to add columns. This is definitively worth the extra MB for me. I hope Fewyn thinks the same way :)
 

Fluxxdog

Active member
Seems it also shows data that's missing, including your own black heart. Very nice.
One suggestion I'd make, if it's possible, is when sorting by a column, if something doesn't have a value, force it to the bottom. This way, when sorting from least to most HP restorers, you don't have all the MP restores that don't restore 0 HP at the top.
 

roippi

Developer
r11034 applies this to a bunch more panels.

Note that I've nowhere near finalized what columns are available on the various panels. For example I'm thinking creatable should be split into "onhand" and "possible" quantities. Or something.

Seems it also shows data that's missing, including your own black heart. Very nice.
One suggestion I'd make, if it's possible, is when sorting by a column, if something doesn't have a value, force it to the bottom. This way, when sorting from least to most HP restorers, you don't have all the MP restores that don't restore 0 HP at the top.

Hm, could do that.
 
Last edited:

Aankhen

Member
I’ve been wanting this for so long, but I never could get my own patches to work properly. Roippi, you’re my hero.
 

lostcalpolydude

Developer
Staff member
When I go to a section with lots of items (in this case, Storage while I'm in ronin) and start typing in the text filter box, mafia seems to be slow at filtering the list of items. Slow in this case means 3 or 4 seconds, when it used to be basically instant.
 

roippi

Developer
Hm. Can I ask about your computer specs? I get basically-instant behavior and I'm on a 4 year old laptop. I may have fewer items in storage though.

In any case, it might be time to rewrite that filter field. What's happening is that the filter is being applied to the data model, and then the table object has to recalculate how to display things. It's pretty inefficient - what would be better is to use the table's built-in filtering, which filters after all the sorting and whatnot has been accomplished. The "checkbox" filters will always have to operate on the data model, unfortunately.

Here's a question- is column sorting instant for you in those huge lists?
 

lostcalpolydude

Developer
Staff member
Windows 7 desktop computer, Intel I5 2.8 GHz processor, 4 GB RAM, 1.5 years old. I have 2304 unique items in storage right now.
 

roippi

Developer
Holy crapola. I only have around 1300. I'm surprised that the difference between 1300 and 2300 is instant -> 4 second delay. I suppose there's some O(n^2) stuff going on.
 

Veracity

Developer
Staff member
OSX 10.6.8 Macbook Pro laptop, 2.2 GHz dual processor, 4 GB RAM, 4 years old.

1923 unique items in storage. Filtering is instantaneous.
 

roippi

Developer
lost - is column sorting instantaneous for you?

What are your heap size numbers? (top right of main frame)

ETA: looks like JXTable's filtering functionality is poor at best. They dropped development on it once Java 6 was released, as filtering is much better implemented natively there. So I won't be overhauling the way we do filtering, but hopefully we can improve performance somehow. Difficult to debug as it works perfectly for me.
 
Last edited:

lostcalpolydude

Developer
Staff member
After closing mafia, getting some sleep, and coming back to it, the filtering is instantaneous for me. All of the other programs I had open before are still open (and I didn't restart the computer), the only difference now is that mafia was just opened instead of being used for hours. I'll check the heap size usage (maximum 256 MB right now) if I run into more problems.
 

Bale

Minion
roippi, this is awesome! You are definitely one of the great heroes of KoLmafia.

Is this feature properly implemented yet, or is there more to do?
 

roippi

Developer
Cool. If there's a garbage collection problem somewhere, that's easier to fix than completely rewriting the filtering system. Not trivial to diagnose, but yeah.

I’ve been wanting this for so long, but I never could get my own patches to work properly. Roippi, you’re my hero.

roippi, this is awesome! You are definitely one of the great heroes of KoLmafia.

Is this feature properly implemented yet, or is there more to do?

Thanks guys :)

Main thing to do before marking this implemented is to add whatever columns people want to see on the various panels. Right now we've got

Usable, Restores, General - ["item name", "autosell", "quantity", "mallprice", "hp restore", "mp restore"]
Creatable - ["item name", "autosell", "quantity", "mallprice"]
Equipment - ["item name", "power", "quantity", "mallprice", "autosell"]

With the first 3 columns visible by default. That can be tweaked, too, though I think that with the default item manager size, any more would be overcrowded.

Note that columns are rather trivial to add, so request away.
 
Last edited:

Bale

Minion
For Cookable and Mixable, it would be nice to have adv/fill and fill.
Closet should have power, adv/fill and fill.

It would also be nice if the global preferences remember column settings between sessions.
 

roippi

Developer
Remembering settings is definitely a goal, but a medium- to long-term one at this point. Kinda tricky.
 

Bale

Minion
Remembering settings is definitely a goal, but a medium- to long-term one at this point. Kinda tricky.

That's fine then. It's not especially important so I can always open up a new feature request for it after this one is finished.
 

roippi

Developer
r11043 should add most of those columns you just asked for. I think. Had to refactor some stuff so let me know if I messed anything up.

I'll go ahead and mark this implemented. New column requests can still go here, or in their own thread. I just like the shiny green tag.
 
For Cookable and Mixable, it would be nice to have adv/fill and fill.
Closet should have power, adv/fill and fill.

It would also be nice if the global preferences remember column settings between sessions.

Also for those, min level requirement. I can live if this is below the cut-line and doesn't make it, but it would be very helpful when sorting. Thanks!
 

roippi

Developer
Also for those, min level requirement. I can live if this is below the cut-line and doesn't make it, but it would be very helpful when sorting. Thanks!

Easy enough. r11045 adds that to the three creation panels. (creatable, cookable, mixable)

I'm not sure if it should be elsewhere? I'm trying not to add all the columns to everywhere, but I'm pliable. Just give me a use case.
 
Top