diff --git a/canframemodel.cpp b/canframemodel.cpp index e061a57..5f84930 100644 --- a/canframemodel.cpp +++ b/canframemodel.cpp @@ -381,6 +381,7 @@ void CANFrameModel::recalcOverwrite() //Then replace the old list of frames with just the unique list frames.clear(); frames.append(overWriteFrames.values().toVector()); + frames.reserve(preallocSize); filteredFrames.clear(); filteredFrames.reserve(preallocSize); diff --git a/connections/socketcand.cpp b/connections/socketcand.cpp index c290204..8a6e5da 100644 --- a/connections/socketcand.cpp +++ b/connections/socketcand.cpp @@ -426,13 +426,7 @@ void SocketCANd::procRXData(QString data, int busNum) } break; case RAWMODE: - //if(!unprocessedData[busNum].isEmpty()) - //{ - // qDebug() << "busNum: " << busNum << "- " << unprocessedData[busNum].length() << " bytes of unprocessedData: " << unprocessedData[busNum] << " adding it to new data: " + data.left(50) + "..."; - // } unprocessedData[busNum] = decodeFrames(unprocessedData[busNum] + data, busNum); - //if(unprocessedData[busNum].length() > 0) - // qDebug() << "busNum: " << busNum << " has data left over, what was at the end of the last packet?: " << data.right(20); if(unprocessedData[busNum].length() > 128) {