David Hendricks uploaded patch set #2 to this change.

View Change

avoid unnecessary syscalls in scanft()

This adds a test to see if the path given to scanft() is a symlink
or a directory before calling opendir() and readdir(). This cuts
down on syscalls which can be very slow.

BUG=none
BRANCH=none
TEST="flashrom -p host -i RW_ELOG:/tmp/elog.bin -r -V" ran on pit a
few hundred milliseconds faster (without other optimizations applied)

Change-Id: Ib067cfda1ba3edbc0b1bba604fa5eb57c64501f2
Reviewed-on: https://chromium-review.googlesource.com/176580
Commit-Queue: David Hendricks <dhendrix@chromium.org>
Tested-by: David Hendricks <dhendrix@chromium.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
---
M file.c
1 file changed, 2 insertions(+), 0 deletions(-)

git pull ssh://review.coreboot.org:29418/flashrom refs/changes/91/22491/2

To view, visit change 22491. To unsubscribe, visit settings.

Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ib067cfda1ba3edbc0b1bba604fa5eb57c64501f2
Gerrit-Change-Number: 22491
Gerrit-PatchSet: 2
Gerrit-Owner: David Hendricks <david.hendricks@gmail.com>
Gerrit-Reviewer: Julius Werner <jwerner@chromium.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org>