Skip to content
This repository has been archived by the owner on Nov 15, 2019. It is now read-only.

Config is read one byte at a time #865

Open
povilasb opened this issue Oct 24, 2017 · 0 comments
Open

Config is read one byte at a time #865

povilasb opened this issue Oct 24, 2017 · 0 comments

Comments

@povilasb
Copy link
Contributor

I was investigating my problems regarding crust configs using strace and as a side effect I noticed such syscall log:

open("/home/povilas/maidsafe/crust/target/debug/examples/sample.config", O_RDONLY|O_CLOEXEC) = 10
ioctl(10, FIOCLEX)                      = 0
flock(10, LOCK_SH)                      = 0
read(10, "{", 1)                        = 1
read(10, "\n", 1)                       = 1
read(10, " ", 1)                        = 1
read(10, " ", 1)                        = 1
read(10, "\"", 1)                       = 1
read(10, "h", 1)                        = 1
read(10, "a", 1)                        = 1
read(10, "r", 1)                        = 1
read(10, "d", 1)                        = 1
read(10, "_", 1)                        = 1
read(10, "c", 1)                        = 1
read(10, "o", 1)                        = 1
read(10, "d", 1)                        = 1
read(10, "e", 1)                        = 1
read(10, "d", 1)                        = 1
read(10, "_", 1)                        = 1
read(10, "c", 1)                        = 1
read(10, "o", 1)                        = 1
read(10, "n", 1)                        = 1
read(10, "t", 1)                        = 1
read(10, "a", 1)                        = 1
read(10, "c", 1)                        = 1
read(10, "t", 1)                        = 1
read(10, "s", 1)                        = 1

The config is read byte by byte. It doesn't look like the most efficient way to do it.
Was this behavior intended for some reasons?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant