19.07.2011, 21:37
Hi! Which method is better for elevator moving?
- Every time elevator reaches wanted position, it opens a file and read the next position
- Load all positions at server start and then just move elevator, which gets positions from arrays
I'm asking because I think that first method will lag because of opening, reading files again and again, and second method will lag because of so much data stored in memory?
- Every time elevator reaches wanted position, it opens a file and read the next position
- Load all positions at server start and then just move elevator, which gets positions from arrays
I'm asking because I think that first method will lag because of opening, reading files again and again, and second method will lag because of so much data stored in memory?