Improved MistInBuffer CPU usage by 50%.
This commit is contained in:
parent
7c759c7664
commit
2d78e1e5f1
1 changed files with 3 additions and 2 deletions
|
@ -451,11 +451,12 @@ namespace Mist {
|
||||||
void inputBuffer::updateTrackMeta(unsigned long tNum) {
|
void inputBuffer::updateTrackMeta(unsigned long tNum) {
|
||||||
//Store a reference for easier access
|
//Store a reference for easier access
|
||||||
std::map<unsigned long, DTSCPageData> & locations = bufferLocations[tNum];
|
std::map<unsigned long, DTSCPageData> & locations = bufferLocations[tNum];
|
||||||
|
char * mappedPointer = metaPages[tNum].mapped;
|
||||||
|
|
||||||
//First detect all entries on metaPage
|
//First detect all entries on metaPage
|
||||||
for (int i = 0; i < 8192; i += 8) {
|
for (int i = 0; i < 8192; i += 8) {
|
||||||
int * tmpOffset = (int *)(metaPages[tNum].mapped + i);
|
int * tmpOffset = (int *)(mappedPointer + i);
|
||||||
if (tmpOffset[0] == 0 && tmpOffset[1] == 0) {
|
if (tmpOffset[0] == 0 && tmpOffset[1] == 0){
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
unsigned long keyNum = ntohl(tmpOffset[0]);
|
unsigned long keyNum = ntohl(tmpOffset[0]);
|
||||||
|
|
Loading…
Add table
Reference in a new issue