CSSE1001 / MyPyTutor

Interactive tutorial application for Python3.
Other
7 stars 12 forks source link

sync time #137

Closed pjritee closed 9 years ago

pjritee commented 9 years ago

When shutting down is there ways of speeding up the sync? E.G. If the hashes are now cached then the hash for an answer only needs to be recomputed when that answer changes. Secondly if a "dirty set" is kept then only those files need to be checked against the server files (unless the student is logged on another machine at the same time but I guess that would be problematic anyway).

sapi commented 9 years ago

The slowdown is just in the server communications, unfortunately.

It still needs to request a hash from the server (that's not cached, because there's always a chance that they could be logged in on another machine, and because it's messy). If those hashes match, then the file won't be uploaded.

On 2 March 2015 at 11:44, Peter Robinson notifications@github.com wrote:

When shutting down is there ways of speeding up the sync? E.G. If the hashes are now cached then the hash for an answer only needs to be recomputed when that answer changes. Secondly if a "dirty set" is kept then only those files need to be checked against the server files (unless the student is logged on another machine at the same time but I guess that would be problematic anyway).

— Reply to this email directly or view it on GitHub https://github.com/CSSE1001/MyPyTutor/issues/137.

sapi commented 9 years ago

I increased the timeout to 10 seconds. The code currently retries 3 times on failure, meaning about 30 seconds should be the longest possible sync.

It's not possible to reduce this any further, as the underlying issue is a network timeout.