File operations speed-up
Sergey Okhapkin
sos@prospect.com.ru
Mon Mar 17 04:31:00 GMT 1997
Hi!
This patch increases the speed of stat/lstat calls dramatically. The trick
is simple. Cygwin's stat call implementation reads the beginning of stated
file to look for a "magic cookie" to define "executable" and "symlink"
attributes of a file. With this patch reading is performed only if file
have "archive" bit cleared. All ordinary files (not executables/symlinks)
have this bit set. After applying this patch You have to "chmod +x file" on
all executables/symlinks. I made a "chmod +x *" on directories with
binaries. Later I'll write a special utility "fssync" to examine all files
in a given directory tree and to set archive bit according to file magic
cookie. Compare the time of "du ." on cygwin's root without and with this
patch :-)
--
Sergey Okhapkin
Moscow, Russia
Looking for a job.
begin 600 archive.diff
M*BHJ('!A=&@N8V,N;W)I9PE4:'4@2F%N(# Q(# S.C Q.C X(#$Y-S *+2TM
M('!A=&@N8V,)5V5D($1E8R Q." Q-SHP-SHR-B Q.3DV"BHJ*BHJ*BHJ*BHJ
M*BHJ*@HJ*BH@.3DS+#DY." J*BHJ"BTM+2 Y.3,L.3DY("TM+2T*(" @(" @
M("!E;'-E"B @"7L*(" )("!?8VQO<V4@*&9D*3L**R )("!C:&UO9"AF<F]M
M<&%T:"P@4U])1DQ.2RD["B @"2 @<F5S(#T@,#L*(" )?0H@(" @("!]"BHJ
M*BHJ*BHJ*BHJ*BHJ*@HJ*BH@,3 R-BPQ,#,Q("HJ*BH*+2TM(#$P,C<L,3 S
M,R M+2TM"B @<WEM;&EN:U]C:&5C:R H8V]N<W0@8VAA<B J<&%T:"P@8VAA
M<B J8G5F+"!I;G0@8G5F;&5N+"!I;G0@*G-Y;6PL(&EN=" J97AE8RD*("![
M"B @("!I;G0@<F5S(#T@+3$["BL@("!I;G0@;F]W(#T@,#L*(" *(" @('!A
M=&A?8V]N=B!P871H8G5F("AP871H*3L*(" @(&EF("AP871H8G5F+F5R<F]R
M*0HJ*BHJ*BHJ*BHJ*BHJ*BH**BHJ(#$P,S0L,3 S.2 J*BHJ"BTM+2 Q,#,V
M+#$P-3$@+2TM+0H@(" @(" @('-Y<V-A;&Q?<')I;G1F("@B+3$@/2!S>6UL
M:6YK7V-H96-K("@E<RP@)7 L("5D*5QN(BP@<&%T:"P@8G5F+"!B=69L96XI
M.PH@(" @(" @(')E='5R;B M,3L*(" @(" @?0HK(" @:68@*"AN;W<@/2!'
M971&:6QE071T<FEB=71E<T$@*'!A=&AB=68N9V5T7W=I;C,R("@I*2D@/3T@
M+3$I"BL@(" @('L**R @(" @("!?7W-E=&5R<FYO("@I.PHK(" @("!]"BL@
M("!I9B H;F]W("8@1DE,15]!5%1224)55$5?05)#2$E612D@>PHK(" @(" J
M<WEM;" ](# ["BL@(" @("IE>&5C(#T@,#L**R @(" @<F5T=7)N(# ["BL@
M("!]"BL@"B @"B @("!314-54DE465]!5%1224)55$53('-A.PH@(" @<V$N
M;DQE;F=T:" ]('-I>F5O9B H<V$I.PHJ*BH@<WES8V%L;',N8V,N;W)I9PE7
M960@1&5C(#$X(#$V.C4Y.C4Q(#$Y.38*+2TM('-Y<V-A;&QS+F-C"5=E9"!$
M96,@,3@@,3@Z,3<Z,C @,3DY-@HJ*BHJ*BHJ*BHJ*BHJ*BH**BHJ(#4V."PU
M-S,@*BHJ*@HM+2T@-38X+#4W.2 M+2TM"B @(" @('T*(" @(&5L<V4*(" @
M(" @>PHK(" @(" @("\J(')E<V5T($%20TA)5D4@871T<FEB=71E(&]N(&5X
M96-U=&%B;&5S(&%N9"!S>6UL:6YK<R J+PHK(" @(" @(&EF("AM;V1E("8@
M4U])1DQ.2RD**R @(" @(" @(&YO=R F/2!^1DE,15]!5%1224)55$5?05)#
M2$E613L**R @(" @("!E;'-E('L**R @(" @(" @(&EF("AM;V1E("8@4U1$
M7UA"2513*0HK(" @(" @(" @("!N;W<@)CT@?D9)3$5?05144DE"551%7T%2
M0TA)5D4["B @(" @(" @+RH@:68@=&AE(&UO9&4@=V4@=V%N="!H87,@86YY
M('=R:71E(&)I=',@<V5T+"!W92!C86XG= H@( D@8F4@<F5A9"!O;FQY+B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402!W9F0[
M"BL@"BL@("!D96)U9U]P<FEN=&8@*"(E<R H)7,L("5P*5QN(BP@8V%L;&5R
M+"!N86UE+"!B=68I.PHK(" @"BL@("!P871H7V-O;G8@<F5A;%]P871H("AN
M86UE*3L**R @(&EF("AR96%L7W!A=&@N97)R;W(I"BL@(" @('L**R @(" @
M("!S971?97)R;F\@*')E86Q?<&%T:"YE<G)O<BD["BL@(" @(" @9V]T;R!D
M;VYE.PHK(" @("!]"BL@"BL@("!M96US970@*&)U9BP@,"P@<VEZ96]F("AS
M=')U8W0@<W1A="DI.PHK(" @;65M<V5T("@F=V9D+" P+"!S:7IE;V8@*'=F
M9"DI.PHK( HK(" @=VEN,S)?;F%M92 ](')E86Q?<&%T:"YG971?=VEN,S(@
M*"D["BL@(" O*B!296UO=F4@=')A:6QI;F<@8F%C:W-L87-H(&EF('-T870@
M;V8@9&ER96-T;W)Y("HO"BL@("!I9BAW:6XS,E]N86UE6W-T<FQE;BAW:6XS
M,E]N86UE*2TQ72 ]/2 G7%PG*0HK(" @("!W:6XS,E]N86UE6W-T<FQE;BAW
M:6XS,E]N86UE*2TQ72 ]("=<,"<["BL@("!A='1S(#T@1FEN9$9I<G-T1FEL
M92AW:6XS,E]N86UE+" F=V9D*3L**R **R @("\J($EF('=E(&-A;B=T(&9I
M;F0@=&AE(&YA;64L('1R>2!A9V%I;B!W:71H(&$@+F5X92!S=69F:7@**R @
M(" @(%MB=70@;VYL>2!I9B!N;W0@86QR96%D>2!P<F5S96YT72X@("HO"BL@
M(" O*B!&25A-13H@1&]I;F<@=&AI<R!I<R!O9B!D=6)I;W5S(&UE<FET+B @
M*B\**R @(&EF("AA='1S(#T]($E.5D%,241?2$%.1$Q%7U9!3%5%"BL@(" @
M(" @)B8@*"AL96X@/2!S=')L96X@*'=I;C,R7VYA;64I*2 \(#4**R )("!\
M?"!S=')C87-E8VUP("AW:6XS,E]N86UE("L@;&5N("T@-"P@(BYE>&4B*2DI
M"BL@(" @('L**R @(" @("!S=')C<'D@*'1M<"P@=VEN,S)?;F%M92D["BL@
M(" @(" @<W1R8V%T("AT;7 L("(N97AE(BD["BL@(" @(" @=VEN,S)?;F%M
M92 ]('1M<#L**R @(" @("!D96)U9U]P<FEN=&8@*")?<W1A=%]W;W)K97(Z
M('1R>6EN9R!W:71H("YE>&4@<W5F9FEX.B E<UQN(BQT;7 I.PHK(" @(" @
M(&%T=',@/2!&:6YD1FER<W1&:6QE("AT;7 L("9W9F0I.PHK(" @("!]"BL@
M(" O*B!4:&4@;&%S="!C87-E("T@<')O8F%B;'DL('=E('-T870@82!R;V]T
M(&1I<F5C=&]R>2 J+PHK(" @:68@*&%T=',@/3T@24Y604Q)1%](04Y$3$5?
M5D%,544I"BL@(" @('L**R @(" @("!W:6XS,E]N86UE(#T@<F5A;%]P871H
M+F=E=%]W:6XS,B H*3L**R @(" @("!S=')C<'D@*'1M<"P@=VEN,S)?;F%M
M92D["BL@(" @(" @<W1R8V%T("AT;7 L(")<7"(I.PHK(" @(" @('=I;C,R
M7VYA;64@/2!T;7 ["BL@(" @(" @9&5B=6=?<')I;G1F("@B7W-T871?=V]R
M:V5R.B!T<GEI;F<@=VET:"!<7"X@<W5F9FEX.B E<UQN(BP@=&UP*3L**R @
M(" @("!A='1S(#T@1V5T1FEL94%T=')I8G5T97-!*'1M<"D["BL@(" @(" @
M:68H*&EN="EA='1S(#T]("TQ*0HK( EA='1S(#T@24Y604Q)1%](04Y$3$5?
M5D%,544["BL@(" @(" @96QS90HK( EW9F0N9'=&:6QE071T<FEB=71E<R ]
M(&%T=',["BL@(" @('T**R @(&EF("AA='1S(#T]($E.5D%,241?2$%.1$Q%
M7U9!3%5%*0HK(" @("!["BL@(" @(" @<V5T7V5R<FYO("A%3D]%3E0I.PHK
M(" @(" @(&=O=&\@9&]N93L**R @(" @?0HK( HK(" @9&5B=6=?<')I;G1F
M("@B)60@/2!'971&:6QE071T<FEB=71E<T$@*"5S*5QN(BP@871T<RP@=VEN
M,S)?;F%M92D["BL@("!I9B H=V9D+F1W1FEL94%T=')I8G5T97,@)B!&24Q%
M7T%45%))0E5415]$25)%0U1/4EDI"BL@(" @("\J($1I<F5C=&]R>2 J+PHK
M(" @("!["BL@(" @(" @+RH@:&UM+"!T:&4@;G5M8F5R(&]F(&QI;FMS('1O
M(&$@9&ER96-T;W)Y(&EN8VQU9&5S('1H92 **R )(&YU;6)E<B!O9B!E;G1R
M:65S(&EN('1H92!D:7)E8W1O<GDL('-I;F-E(&%L;"!T:&4@=&AI;F=S"BL@
M"2!I;B!T:&4@9&ER96-T;W)Y('!O:6YT('1O(&ET("HO"BL@(" @(" @8G5F
M+3YS=%]N;&EN:R K/2 R("L@;G5M7V5N=')I97,@*'=I;C,R7VYA;64I.PHK
M(" @(" @(&)U9BT^<W1?9&5V(#T@-#(["BL@(" @(" @8G5F+3YS=%]I;F\@
M/2!H87-H7W!A=&A?;F%M92 H<F5A;%]P871H+F=E=%]W:6XS,B H*2D["BL@
M(" @(" @8G5F+3YS=%]M;V1E(#T@4U])1D1)4B!\(%-41%]20DE44R!\(%-4
M1%]70DE44R!\(%-41%]80DE44SL**R @(" @("!B=68M/G-T7V%T:6UE(" @
M/2!T;U]T:6UE7W0@*"9W9F0N9G1,87-T06-C97-S5&EM92D["BL@(" @(" @
M8G5F+3YS=%]M=&EM92 @(#T@=&]?=&EM95]T("@F=V9D+F9T3&%S=%=R:71E
M5&EM92D["BL@(" @(" @8G5F+3YS=%]C=&EM92 @(#T@=&]?=&EM95]T("@F
M=V9D+F9T0W)E871I;VY4:6UE*3L**R @(" @("!B=68M/G-T7W-I>F4@(" @
M/2!W9F0N;D9I;&53:7IE3&]W.PHK(" @(" @(&)U9BT^<W1?=6ED(#T@9V5T
M=6ED("@I.PHK(" @(" @(&)U9BT^<W1?9VED(#T@9V5T9VED("@I.PHK(" @
M(" @(')E<R ](# ["BL@(" @('T**R @(&5L<V4**R @(" @+RH@1FEL92 J
M+PHK(" @("!["BL@(" @(" @:68@*'=F9"YD=T9I;&5!='1R:6)U=&5S("8@
M1DE,15]!5%1224)55$5?05)#2$E612D**R @(" @(" @("\J($]R9&EN87)Y
M(&9I;&4L(&YO="!S>6UL:6YK+W-H96QL('-C<FEP=" J+PHK(" @(" @(" @
M>PHK(" @(" @(" @("!B=68M/G-T7V%T:6UE(" @/2!T;U]T:6UE7W0@*"9W
M9F0N9G1,87-T06-C97-S5&EM92D["BL@(" @(" @(" @(&)U9BT^<W1?;71I
M;64@(" ]('1O7W1I;65?=" H)G=F9"YF=$QA<W17<FET951I;64I.PHK(" @
M(" @(" @("!B=68M/G-T7V-T:6UE(" @/2!T;U]T:6UE7W0@*"9W9F0N9G1#
M<F5A=&EO;E1I;64I.PHK( D@("\J($9)6$U%.B!D;R!C;W)R96-T('-T7VYL
M:6YK(&%N9"!S=%]I;F\@*B\**R @(" @(" @(" @8G5F+3YS=%]N;&EN:R @
M(#T@,3L**R @(" @(" @(" @8G5F+3YS=%]D978@(" @(#T@,3L**R @(" @
M(" @(" @8G5F+3YS=%]S:7IE(" @(#T@=V9D+FY&:6QE4VEZ94QO=SL**R @
M(" @(" @(" @8G5F+3YS=%]I;F\@(" @(#T@+RIW9F0N;D9I;&5);F1E>$QO
M=R!>*B\@:&%S:%]P871H7VYA;64@*'=I;C,R7VYA;64I.PHK(" @(" @(" @
M("!B=68M/G-T7V)L:W-I>F4@/2!37T),2U-)6D4["BL@(" @(" @(" @(&)U
M9BT^<W1?8FQO8VMS(" ]("AB=68M/G-T7W-I>F4@*R!37T),2U-)6D4M,2D@
M+R!37T),2U-)6D4["BL@(" @(" @(" @(&)U9BT^<W1?=6ED(" @(" ](&=E
M='5I9" H*3L**R @(" @(" @(" @8G5F+3YS=%]G:60@(" @(#T@9V5T9VED
M("@I.PHK(" @(" @(" @("!B=68M/G-T7VUO9&4@(" @/2!35$1?4D))5%,@
M?"!37TE&4D5'.PHK(" @"BL@(" @(" @(" @(&EF("@A("AW9F0N9'=&:6QE
M071T<FEB=71E<R F($9)3$5?05144DE"551%7U)%041/3DQ9*2D**R @(" @
M(" @(" @("!B=68M/G-T7VUO9&4@?#T@4U1$7U="2513.PHK(" @(" @(" @
M("!R97,@/2 P.PHK(" @(" @(" @?0HK(" @(" @(&5L<V4**R @(" @(" @
M('L**R )+RH@3&5T(&9S=&%T(&1O(&%L;"!D:7)T>2!W;W)K("HO"0HK(" @
M(" @(" @(" @"BL@(" @(" @(" @(&EN="!H(#T@7V]P96X@*'=I;C,R7VYA
M;64L($]?4D1/3DQ9('P@3U]"24Y!4ED@?"!N;V9O;&QO=RD["BL@(" @(" @
M(" @(&EF("AH(#X](# I"BL@"2 @("!["BL@( D@(" @("!R97,@/2!?9G-T
M870@*&@L(&)U9BD["BL@"2 @(" @(%]C;&]S92 H:"D["BL@"2 @("!]"BL@
M(" @(" @("!]"BL@(" @('T**R @($9I;F1#;&]S92AA='1S*3L@( H@("!D
M;VYE.@H@(" @<WES8V%L;%]P<FEN=&8@*"(E9" ]("5S("@E<RP@)7 I7&XB
K+"!R97,L(&-A;&QE<BP@;F%M92P@8G5F*3L*(" @(')E='5R;B!R97,["FXB
`
end
-
For help on using this list, send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".
More information about the Cygwin
mailing list