If someone can help me, I am completely out of touch.
So, I have this code (this is a very simplified version of my code):
while(readNewFile()) { while(getNewStructFromFile()) { unsigned long starttime = GetTickCount(); customerData.fillFromBinaryData(structPointer); cout<< GetTickCount() - starttime; aMap.insert(pair<int,string>(customerData.phoneNumber,"")); }
Basically, it just reads the entries from the binary file. customerData get data and populate its variables with data from it. Then it inserts the phone number into the card (for debugging, I really just insert the int and the empty string).
The problem is that after a short time this program becomes very slow; if I comment on the insertion of the card, the program works fine without problems with a constant runtime for each file. If I use the card insert, after several files the program runs very slowly again (from 8 to 10 seconds to 1 minute or more). But debugging with GetTickCount() , it shows me that the delay occurs in customerData.fillFromBinaryData (first 0 ms, and then it jumps to 30-40 ms (to fill class variables)). But if I comment on this simple insertion of the map, there is no delay in filling the object with data! Where is the logic in this? Can anyone give me a hint, I have no ideas. Sorry if this question is not very good.
I tried different types of cards, but again, this shows me that the delay is not related to inserting a card.
Change / Possible Solution:
If anyone has similar problems, I installed VS2015 and the delay using the cards disappeared! I'm not sure how this is connected, but Hooray!
source share