Re: [Scid-users] on-demand photo loading

2009-06-26 Thread Mikhail Kalenkov
2009/2/12 Alexander Wagner : >>> Well I think I took the top100 and piped that to some piece >>> of perl to generate the file and just prepend the title to >>> match FICS naming convention. Ie. I've a photo of Anand and >>> GMAnand in another file. Large, hm, no not really but its >>> not a "nice"

Re: [Scid-users] on-demand photo loading

2009-02-16 Thread Mikhail Kalenkov
2009/2/12 Alexander Wagner : > Mikhail Kalenkov wrote: > > Mikhail, > >>> addPhotoAlias "GMJoe" "User, Joe" >>> addPhotoAlias "Joe_User" "User, Joe" >>> addPhotoAlias "joe" "User, Joe" >> >> Of course, it support as many aliases as you want. > > Good. :) > > [...] >> >> I never used FICS as a so

Re: [Scid-users] on-demand photo loading

2009-02-12 Thread Alexander Wagner
Mikhail Kalenkov wrote: Mikhail, >> addPhotoAlias "GMJoe" "User, Joe" >> addPhotoAlias "Joe_User" "User, Joe" >> addPhotoAlias "joe" "User, Joe" > > Of course, it support as many aliases as you want. Good. :) [...] > I never used FICS as a source of the games. That's why I guess that we > s

Re: [Scid-users] on-demand photo loading

2009-02-12 Thread Mikhail Kalenkov
2009/2/12 Alexander Wagner : > Mikhail Kalenkov wrote: > > Hi! > >> I found that my approach with GM prefix removing didn't work in 50% >> cases. I took fics logins for Linares 2009 players and Topalov - >> Kamsky match > > [...] >> >> So: 6 fails, 4 OK. The result is nonsatisfactory. > > I agree t

Re: [Scid-users] on-demand photo loading

2009-02-12 Thread Alexander Wagner
Mikhail Kalenkov wrote: Hi! > I found that my approach with GM prefix removing didn't work in 50% > cases. I took fics logins for Linares 2009 players and Topalov - > Kamsky match [...] > So: 6 fails, 4 OK. The result is nonsatisfactory. I agree that this is a bit a low rate. It doesn't make me

Re: [Scid-users] on-demand photo loading

2009-02-12 Thread Alexander Wagner
Mikhail Kalenkov wrote: Hi! > 2009/2/11 Alexander Wagner : >> Mikhail Kalenkov wrote: >> >> Hi! >> > regsub {^GM} $engine {} engine at the beginning of the > trimEngineName proc from main.tcl file and it allows me > to see GM photos from the FICS relay games. I will test > it duri

Re: [Scid-users] on-demand photo loading

2009-02-12 Thread Mikhail Kalenkov
2009/2/11 Pascal Georges : > > > 2009/2/11 Mikhail Kalenkov >> >> 2009/2/11 Alexander Wagner : >> > Mikhail Kalenkov wrote: >> > >> > Hi! >> > >> >> I have added just one line >> >> regsub {^GM} $engine {} engine >> >> at the beginning of the trimEngineName proc from main.tcl file and it >> >> all

Re: [Scid-users] on-demand photo loading

2009-02-11 Thread Mikhail Kalenkov
2009/2/11 Alexander Wagner : > Mikhail Kalenkov wrote: > > Hi! > regsub {^GM} $engine {} engine at the beginning of the trimEngineName proc from main.tcl file and it allows me to see GM photos from the FICS relay games. I will test it during Linares. >>> >>> This would be great,

Re: [Scid-users] on-demand photo loading

2009-02-11 Thread Pascal Georges
2009/2/11 Mikhail Kalenkov > 2009/2/11 Alexander Wagner : > > Mikhail Kalenkov wrote: > > > > Hi! > > > >> I have added just one line > >> regsub {^GM} $engine {} engine > >> at the beginning of the trimEngineName proc from main.tcl file and it > >> allows me to see GM photos from the FICS relay

Re: [Scid-users] on-demand photo loading

2009-02-11 Thread Pascal Georges
More important is the amount of memory saved : my Scid instance went from 190 MB to 110 MB of RAM, which is a great improvement. Pascal -- Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM) softw

Re: [Scid-users] on-demand photo loading

2009-02-11 Thread Mikhail Kalenkov
2009/2/11 Alexander Wagner : > Mikhail Kalenkov wrote: > > Hi! > regsub {^GM} $engine {} engine at the beginning of the trimEngineName proc from main.tcl file and it allows me to see GM photos from the FICS relay games. I will test it during Linares. >>> >>> This would be great,

Re: [Scid-users] on-demand photo loading

2009-02-11 Thread Alexander Wagner
Mikhail Kalenkov wrote: Hi! >>> regsub {^GM} $engine {} engine at the beginning of the >>> trimEngineName proc from main.tcl file and it allows me >>> to see GM photos from the FICS relay games. I will test >>> it during Linares. >> This would be great, and fix a pending issue I had for >> some t

Re: [Scid-users] on-demand photo loading

2009-02-11 Thread Mikhail Kalenkov
2009/2/11 Alexander Wagner : > Mikhail Kalenkov wrote: > > Hi! > >> I have added just one line >> regsub {^GM} $engine {} engine >> at the beginning of the trimEngineName proc from main.tcl file and it >> allows me to see GM photos from the FICS relay games. I will test it >> during Linares. > > Th

Re: [Scid-users] on-demand photo loading

2009-02-11 Thread Alexander Wagner
Pascal Georges wrote: Hi! > Done > > https://sourceforge.net/tracker2/index.php?func=detail&aid=2584712&group_id=26963&atid=389082 > > > > > Very good, it works for me. Note that Scid s

Re: [Scid-users] on-demand photo loading

2009-02-11 Thread pgeorges
Mikhail Kalenkov a écrit : > 2009/2/10 Pascal Georges : > >> 2009/2/10 Mikhail Kalenkov >> >>> 2009/2/6 Pascal Georges : >>> Please post a patch when it is done. >>> Done >>> >>> https://sourceforge.net/tracker2/index.php?func=detail&aid=2584712&group_id=26963&ati

Re: [Scid-users] on-demand photo loading

2009-02-11 Thread Mikhail Kalenkov
2009/2/10 Pascal Georges : > > > 2009/2/10 Mikhail Kalenkov >> >> 2009/2/6 Pascal Georges : >> > Please post a patch when it is done. >> >> Done >> >> https://sourceforge.net/tracker2/index.php?func=detail&aid=2584712&group_id=26963&atid=389082 > > Very good, it works for me. Note that Scid starts

Re: [Scid-users] on-demand photo loading

2009-02-11 Thread Mikhail Kalenkov
2009/2/10 Pascal Georges : > > > 2009/2/10 Mikhail Kalenkov >> >> 2009/2/6 Pascal Georges : >> > Please post a patch when it is done. >> >> Done >> >> https://sourceforge.net/tracker2/index.php?func=detail&aid=2584712&group_id=26963&atid=389082 > > Very good, it works for me. Note that Scid starts

Re: [Scid-users] on-demand photo loading

2009-02-10 Thread Pascal Georges
2009/2/10 Mikhail Kalenkov > 2009/2/6 Pascal Georges : > > Please post a patch when it is done. > > Done > > https://sourceforge.net/tracker2/index.php?func=detail&aid=2584712&group_id=26963&atid=389082 > Very good, it works for me. Note that Scid starts a little bit faster, (players data loadin

Re: [Scid-users] on-demand photo loading

2009-02-10 Thread Mikhail Kalenkov
2009/2/6 Pascal Georges : > Please post a patch when it is done. Done https://sourceforge.net/tracker2/index.php?func=detail&aid=2584712&group_id=26963&atid=389082 -- Create and Deploy Rich Internet Apps outside the brows

Re: [Scid-users] on-demand photo loading

2009-02-09 Thread Alexander Wagner
pgeorges wrote: Hi! > Mikhail Kalenkov a écrit: >> Pascal, I found the following lines in the main.tcl >> >> # Read players.img for compatibility with older versions: >> readPhotoFile [file join $scidUserDir players.img] >> >> I have never seen players.img files. As far as I >> understand it has

Re: [Scid-users] on-demand photo loading

2009-02-09 Thread pgeorges
Mikhail Kalenkov a écrit : > Pascal, I found the following lines in the main.tcl > > # Read players.img for compatibility with older versions: > readPhotoFile [file join $scidUserDir players.img] > > I have never seen players.img files. As far as I understand it has > usual structure as ordinary sp

Re: [Scid-users] on-demand photo loading

2009-02-09 Thread Mikhail Kalenkov
Pascal, I found the following lines in the main.tcl # Read players.img for compatibility with older versions: readPhotoFile [file join $scidUserDir players.img] I have never seen players.img files. As far as I understand it has usual structure as ordinary spf file. Is it correct? Should my patch

Re: [Scid-users] on-demand photo loading

2009-02-09 Thread Mikhail Kalenkov
2009/2/9 Pascal Georges : > And it is also easy to check for corruption : when reading the data you can > verify that some start /end markers are present, that is at the beginning > you read something like "photo name {" and that after (offset + length) you > have a closing "}". Interesting. I wil

Re: [Scid-users] on-demand photo loading

2009-02-09 Thread Pascal Georges
2009/2/8 Alexander Wagner > This is most likely a general issue. I think especially if > Scid can not generate it on the fly in case a wrong file is > found. BTW: how is it solved at the moment, and what happens > if the index is corrupt (with regards to the file it should > refer to)? Say, what

Re: [Scid-users] on-demand photo loading

2009-02-08 Thread pgeorges
Mikhail Kalenkov a écrit : > Of course, I can rewrite my script as a proc, but then arise a lot of > questions. How to handle read only directories. How to keep spf and > index file in consistent way. Solving such questions lead to > overcomplicated approach. I think about much simpler approach. If

Re: [Scid-users] on-demand photo loading

2009-02-08 Thread Mikhail Kalenkov
> This is the only reason why I'd suggest(!) to check for > existence of an index on startup AND the generation of it > right away if no index is found. OK. I'll do it. -- Create and Deploy Rich Internet Apps outside the

Re: [Scid-users] on-demand photo loading

2009-02-08 Thread Alexander Wagner
Mikhail Kalenkov wrote: Hi! [...] >> Additionally, I think adding such a procedure to the startup >> would not harm and porting your tcl-script to a proc >> shouldn't be too hard. > Of course, I can rewrite my script as a proc, but then > arise a lot of questions. How to handle read only > direct

Re: [Scid-users] on-demand photo loading

2009-02-08 Thread Mikhail Kalenkov
2009/2/7 Alexander Wagner : > Mikhail Kalenkov wrote: > > Hi! > >> I posted a script which generate the index in my previous >> e-mail. In 99.99% cases scid user never edit spf files, so >> we can distribute spf files together with index file and >> index regeneration will never become necessary. >

Re: [Scid-users] on-demand photo loading

2009-02-07 Thread Alexander Wagner
Mikhail Kalenkov wrote: Hi! > I posted a script which generate the index in my previous > e-mail. In 99.99% cases scid user never edit spf files, so > we can distribute spf files together with index file and > index regeneration will never become necessary. You are right, in a way. But if Scid c

Re: [Scid-users] on-demand photo loading

2009-02-06 Thread Mikhail Kalenkov
2009/2/6 Pascal Georges : > > > 2009/2/6 Mikhail Kalenkov >> >> 2009/2/5 Pascal Georges : >> >> > For example the use of an index file that gives data location and size >> > of >> > player picture in the SPF file. Then use seek and read Tcl calls. >> > The index may be a Tcl array which is very ef

Re: [Scid-users] on-demand photo loading

2009-02-06 Thread Benoit St-Pierre
Great team work, guys ! That's the free spirit ! Thanks ! -- Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM) software. With Adobe AIR, Ajax developers can use existing skills and code to bui

Re: [Scid-users] on-demand photo loading

2009-02-06 Thread Pascal Georges
2009/2/6 Mikhail Kalenkov > 2009/2/5 Pascal Georges : > > > For example the use of an index file that gives data location and size of > > player picture in the SPF file. Then use seek and read Tcl calls. > > The index may be a Tcl array which is very efficient. > > I did it. The code below parse

Re: [Scid-users] on-demand photo loading

2009-02-06 Thread Alexander Wagner
Mikhail Kalenkov wrote: Hi! > Of course I meant 3.7beta4 (not 3.4beta4). Also I checked that > prebuilt index files drastically reduces start-up time. > I generate index files with the following script What about: if !(-e $indexfile) { GenerateIndexFile() } else { source $

Re: [Scid-users] on-demand photo loading

2009-02-06 Thread Mikhail Kalenkov
2009/2/6 Mikhail Kalenkov : > 2009/2/6 Mikhail Kalenkov : >> 2009/2/5 Pascal Georges : >> >>> For example the use of an index file that gives data location and size of >>> player picture in the SPF file. Then use seek and read Tcl calls. >>> The index may be a Tcl array which is very efficient. >>

Re: [Scid-users] on-demand photo loading

2009-02-06 Thread Mikhail Kalenkov
2009/2/6 Mikhail Kalenkov : > 2009/2/5 Pascal Georges : > >> For example the use of an index file that gives data location and size of >> player picture in the SPF file. Then use seek and read Tcl calls. >> The index may be a Tcl array which is very efficient. > > I did it. I tested scid memory us

Re: [Scid-users] on-demand photo loading

2009-02-06 Thread Mikhail Kalenkov
2009/2/5 Pascal Georges : > For example the use of an index file that gives data location and size of > player picture in the SPF file. Then use seek and read Tcl calls. > The index may be a Tcl array which is very efficient. I did it. The code below parse at scid start-up spf files and store in

Re: [Scid-users] on-demand photo loading

2009-02-05 Thread Mikhail Kalenkov
2009/2/5 Pascal Georges : > > > 2009/2/4 Mikhail Kalenkov >> >> Sorry, I again forgot to change field To: >> >> 2009/2/4 Alexander Wagner : >> > Mikhail Kalenkov wrote: >> > >> > Hi! >> > >> >>> Do you see a way for some sort of one file for this? >> >> >> >> Yes, I have some ideas. I simply zip t

Re: [Scid-users] on-demand photo loading

2009-02-05 Thread Pascal Georges
2009/2/4 Mikhail Kalenkov > Sorry, I again forgot to change field To: > > 2009/2/4 Alexander Wagner : > > Mikhail Kalenkov wrote: > > > > Hi! > > > >>> Do you see a way for some sort of one file for this? > >> > >> Yes, I have some ideas. I simply zip these files into one archive. > >> Using tclv

Re: [Scid-users] on-demand photo loading

2009-02-04 Thread Mikhail Kalenkov
Sorry, I again forgot to change field To: 2009/2/4 Alexander Wagner : > Mikhail Kalenkov wrote: > > Hi! > >>> Do you see a way for some sort of one file for this? >> >> Yes, I have some ideas. I simply zip these files into one archive. >> Using tclvfs extension I can mount zip archives and read it

Re: [Scid-users] on-demand photo loading

2009-02-04 Thread Mikhail Kalenkov
2009/2/3 Alexander Wagner : > Mikhail Kalenkov wrote: > > Hi! > >> OK You are right. At least I understood photo loading in scid. > > :) > >> I tried I store each photo in separate file with filename >> as md5sum of the player name. > > Ah. md5suming is an interesting idea as no doubled names are >

Re: [Scid-users] on-demand photo loading

2009-02-03 Thread Alexander Wagner
Mikhail Kalenkov wrote: Hi! > OK You are right. At least I understood photo loading in scid. :) > I tried I store each photo in separate file with filename > as md5sum of the player name. Ah. md5suming is an interesting idea as no doubled names are allowed anyway, as we've only the name and no

Re: [Scid-users] on-demand photo loading

2009-02-03 Thread Mikhail Kalenkov
OK You are right. At least I understood photo loading in scid. I tried I store each photo in separate file with filename as md5sum of the player name. It work at no cost. I have working implementation already. Mikhail Kalenkov. 2009/2/2 Alexander Wagner : > Mikhail Kalenkov wrote: > > Hi! > >>

Re: [Scid-users] on-demand photo loading

2009-02-02 Thread Alexander Wagner
Mikhail Kalenkov wrote: Hi! > 2009/2/1 Alexander Wagner : >> Well, it will already reduce memory footprint if you just >> don't source a huge tcl-array as the current code does. ;) > Do you know how to measure memory usage. I played with ps > command output and it gave me strange result. For > i

Re: [Scid-users] on-demand photo loading

2009-02-02 Thread Mikhail Kalenkov
2009/2/1 Alexander Wagner : > Well, it will already reduce memory footprint if you just > don't source a huge tcl-array as the current code does. ;) Do you know how to measure memory usage. I played with ps command output and it gave me strange result. For instance VSZ and RSS fields may greatly

Re: [Scid-users] on-demand photo loading

2009-02-01 Thread Pascal Georges
2009/2/1 Mikhail Kalenkov > 2009/2/1 Pascal Georges : > > > > > > 2009/2/1 Mikhail Kalenkov > >> > >> Hi all, > >> > >> Currently I am writing code for a on-demand photo loading. I have done > >> most part of the work already (new format for photo files, search > >> proc). > >> > >> Now I am try

Re: [Scid-users] on-demand photo loading

2009-02-01 Thread Mikhail Kalenkov
2009/2/1 Alexander Wagner : > Mikhail Kalenkov wrote: > > Hi! > >> Currently I am writing code for a on-demand photo loading. >> I have done most part of the work already (new format for >> photo files, search proc). > > Would this mean the end of current memory waste for large > photo collections?

Re: [Scid-users] on-demand photo loading

2009-02-01 Thread Mikhail Kalenkov
2009/2/1 Pascal Georges : > > > 2009/2/1 Mikhail Kalenkov >> >> Hi all, >> >> Currently I am writing code for a on-demand photo loading. I have done >> most part of the work already (new format for photo files, search >> proc). >> >> Now I am trying to understand how updatePlayerPhotos proc (from

Re: [Scid-users] on-demand photo loading

2009-02-01 Thread Alexander Wagner
Mikhail Kalenkov wrote: Hi! > Currently I am writing code for a on-demand photo loading. > I have done most part of the work already (new format for > photo files, search proc). Would this mean the end of current memory waste for large photo collections? This would be a really cool feature! You

Re: [Scid-users] on-demand photo loading

2009-02-01 Thread Pascal Georges
2009/2/1 Mikhail Kalenkov > Hi all, > > Currently I am writing code for a on-demand photo loading. I have done > most part of the work already (new format for photo files, search > proc). > > Now I am trying to understand how updatePlayerPhotos proc (from > main.tcl file) works. Could somebody sa

[Scid-users] on-demand photo loading

2009-02-01 Thread Mikhail Kalenkov
Hi all, Currently I am writing code for a on-demand photo loading. I have done most part of the work already (new format for photo files, search proc). Now I am trying to understand how updatePlayerPhotos proc (from main.tcl file) works. Could somebody say what do mean "oldWhite" and "oldBlack" v