World: r3wp
[Core] Discuss core issues
older newer | first last |
[unknown: 5] 18-Dec-2008 [11526x2] | How did you do those test STeeve? I have been interesting in changing Trebases operation depending on how that works. |
Right Brian but it doesn't seem to. | |
BrianH 18-Dec-2008 [11528] | I'll defer to Steeve on this one - I am more familiar with the R3 port model than the R2 one. |
[unknown: 5] 18-Dec-2008 [11529x2] | Not with the file port Brian. At seems to always work from the head. |
if you open a port in direct mode it is always at head but in seek mode you can pick from the a specific point in the file. | |
BrianH 18-Dec-2008 [11531] | Yeah, the port-as-series model doesn't work with direct very well. |
Steeve 18-Dec-2008 [11532x6] | Paul, it's just using port/state/index is theoricaly faster than at (because at is a wrapper) |
internally 'at uses port/state/index | |
you can see the source (i don't remember where) | |
iirc | |
the most annoying overhead comes from the wrapper of the copy func. you should use read-io instead of, if you want very fast access | |
read-io and write-io use correctly the port/state/index, just don't forget that port/state/index is zero based (seems to be a bug) | |
[unknown: 5] 18-Dec-2008 [11538x2] | Steeve, yeah I would assume that is the case. So the difference your seeing in performance is really just a small one as a result of the 'at then being a wrapper? |
I'm might do some tests here to see myself | |
Steeve 18-Dec-2008 [11540] | agreed it's a small overhead concerning at, but not concerning copy (see the source if you find it) |
[unknown: 5] 18-Dec-2008 [11541] | source for what? |
Steeve 18-Dec-2008 [11542] | source for the file port handler, ok i'm looking for it.... |
BrianH 18-Dec-2008 [11543] | You can't see the source of the file port handler. |
Steeve 18-Dec-2008 [11544] | in the past i found something... |
BrianH 18-Dec-2008 [11545] | It's native code. |
Steeve 18-Dec-2008 [11546] | perhaps it's the scheme to be exact |
BrianH 18-Dec-2008 [11547] | You might be thinking of one of these: >> first system/schemes == [self default Finger Whois Daytime SMTP ESMTP POP IMAP HTTP FTP NNTP HTTPS] |
[unknown: 5] 18-Dec-2008 [11548x2] | So what you really mean Steeve is that read-io is faster than copy correct? |
That would make sense since read-io is lower level | |
Steeve 18-Dec-2008 [11550] | i think it is |
[unknown: 5] 18-Dec-2008 [11551] | I never check to see how significant the difference was though. I might try a test on a million records or so |
BrianH 18-Dec-2008 [11552] | I have got to backport the R3 profiling functions to R2 :( |
[unknown: 5] 18-Dec-2008 [11553x2] | Would be nice Brian but I got good ole stats/evals |
speaking of backporting is 2.7.6 the end or is 2.7.7 still a possibility? | |
BrianH 18-Dec-2008 [11555x2] | Further R2 releases will wait until after the R3 developer release, but they are coming. |
The R3 profiling functions are wrappers around the R3 stats, so I just have to translate that to the R2 stats. | |
Steeve 18-Dec-2008 [11557] | i think that in the past i saw the source of the file-handler even if i can't find it anymore in my sources. i have the sources of the handlers of other shemes in some proto scripts delivred with the commercial version of view. But nothing else... i loose my memory... |
[unknown: 5] 18-Dec-2008 [11558x3] | read-io shouldn't be used with /seek it appears. |
in fact they should make it so that it CAN'T be. | |
need it to throw an error or something. | |
Steeve 18-Dec-2008 [11561] | why ? i use it with /seek as well |
[unknown: 5] 18-Dec-2008 [11562x14] | how many characters do you attempt to read each time? |
seems with see you only get 15 characters to fill the buffer | |
see = seek | |
pass it a greater number and it will still only return 15 | |
works ok with direct though | |
I think I ran into this problem before | |
Gonna check Rambo. | |
Ahhhh, I see. I just discovered something. | |
Looks like an empty string is about 16 bytes | |
Better becareful to size your buffer when using read-io. | |
It doesn't expand beyond a default of 15 characters unless you define it as such. | |
So in other words if you set your bufrer as just: | |
buffer: "" then you going to only get 15 chars back. | |
So instead you need to define it as large as needed: | |
older newer | first last |