Opened 6 years ago

Last modified 4 years ago

#1524 confirmed change

Remove the various huge *_info arrays, thus removing the need for maxima

Reported by: takkaria Owned by:
Milestone: Future Keywords: cleanup
Cc:

Description (last modified by takkaria)

Elly started work on this a while ago, but it's quite tricky. In order to make it happen, we have to move away from indexing arrays when we already have a pointer handy (#1499), and then hopefully we'll have no reason to find specific items anymore. After that, we can just traverse an entire linked list for what we need.

Change History (10)

comment:1 Changed 6 years ago by takkaria

  • Description modified (diff)

comment:2 Changed 6 years ago by magnate

This is related to, or possibly even a duplicate of, #1237

comment:3 Changed 6 years ago by takkaria

Not a dupe - removing maxima does not necessarily imply restructuring the code so it doesn't rely on indexing and/or arrays. The kind of thing I'm talking about here is like what happened in struct object: instead of having a_idx and e_idx stored, you store pointers to the relevant ego or artifact template. With an array you still need maxima, even if they're calculated after reading the data rather than beforehand. This means we have memory allocated but yet unused (where there are gaps in the edit files) and it's much easier to cause accidental segfaults by indexing out of bounds by accident. It's also less efficient, since just storing a pointer to the data you want is more efficient than continually re-indexing into arrays...

comment:4 Changed 5 years ago by fizzix

  • Milestone changed from 3.4.0 to 3.5.0

Punting to 3.5

comment:5 Changed 5 years ago by takkaria

  • Reporter takkaria deleted

comment:6 Changed 5 years ago by takkaria

  • Reporter set to takkaria
  • Status changed from new to assigned

comment:7 Changed 5 years ago by takkaria

  • Status changed from assigned to confirmed

comment:8 Changed 5 years ago by takkaria

  • Owner takkaria deleted
  • Status changed from confirmed to assigned

comment:9 Changed 5 years ago by takkaria

  • Status changed from assigned to confirmed

comment:10 Changed 4 years ago by takkaria

  • Milestone changed from 3.5.0 to Future
Note: See TracTickets for help on using tickets.