Posted 02 March 2013 - 12:29 PM
Hello!
I found a big issue with computer space limitation:
The more files you have on computer the longer it's going to take to write something to disk.
Steps to reproduce:
- make sure that you have "I:computerSpaceLimit" in config set to something other than 0
- create 10 files in computer main directory
- run this lua code:
Then turn off your minecraft instance
- set "I:computerSpaceLimit" to 0
- run this lua code again
For me the first time it errored "too long without yelling"
the second time was about 10 ms
From my tests:
- file 525 bytes long
- script copying it to new file 100 times
- 1st iteration - writing time 1.25 sec
- 20th iteration 2.6 sec
- 78th iteration - 4.95 sec
- 79th iteration - too long without yelling
It's not effecting reading time, tho.
I have idea why it's working like that, but it can't work like that.
Thanks for solving this issue!
I found a big issue with computer space limitation:
The more files you have on computer the longer it's going to take to write something to disk.
Steps to reproduce:
- make sure that you have "I:computerSpaceLimit" in config set to something other than 0
- create 10 files in computer main directory
- run this lua code:
local file = fs.open("test.bin", "wb")
for i = 1, 1024, 1 do file.write(i % 256) end
file.close()
Then turn off your minecraft instance
- set "I:computerSpaceLimit" to 0
- run this lua code again
For me the first time it errored "too long without yelling"
the second time was about 10 ms
From my tests:
- file 525 bytes long
- script copying it to new file 100 times
- 1st iteration - writing time 1.25 sec
- 20th iteration 2.6 sec
- 78th iteration - 4.95 sec
- 79th iteration - too long without yelling
It's not effecting reading time, tho.
I have idea why it's working like that, but it can't work like that.
Thanks for solving this issue!