1
0
mirror of https://github.com/RPCS3/rpcs3.git synced 2024-11-22 18:53:28 +01:00

Optimize PPU module loading

I'm garbage 🤦
This commit is contained in:
Nekotekina 2017-10-10 16:40:46 +03:00
parent efe140bc0c
commit ac64792d99
2 changed files with 12 additions and 2 deletions

View File

@ -63,6 +63,16 @@ struct ppu_module
std::vector<ppu_segment> secs;
std::vector<ppu_function> funcs;
// Copy info without functions
void copy_part(const ppu_module& info)
{
name = info.name;
path = info.path;
relocs = info.relocs;
segs = info.segs;
secs = info.secs;
}
void analyse(u32 lib_toc, u32 entry);
void validate(u32 reloc);
};

View File

@ -1115,8 +1115,8 @@ extern void ppu_initialize(const ppu_module& info)
const auto fstart = fpos;
// Copy module information (TODO: optimize)
ppu_module part = info;
part.funcs.clear();
ppu_module part;
part.copy_part(info);
part.funcs.reserve(16000);
// Unique suffix for each module part