Page 2 of 3

Re: Kombilo 0.7.1

Posted: Thu Apr 12, 2012 12:32 am
by ugoertz
RBerenguel wrote:If you know how I can get some profiling working let me know and I'll look into it. Of course in a Mac the X system has to launch, but today I had it already opened, so this does not look like the issue.


I do not have a great idea how to do this. Here is one possibility that might help: Instead of kombilo.py, let us work with the viewer script v.py, so that loading the databases does not come in.

In v.py, at the very beginning of the file, add

Code: Select all

## OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE⌓
## SOFTWARE.

import time                     # add these
t = time.time()                 # two lines

import cPickle



Then, add some print statements at the very end of the file, for example:

Code: Select all

if __name__ == '__main__':

    print 'Step 1', time.time() - t

    root = Tk()
    root.withdraw()
    print 'Step 2', time.time() - t

    if sys.path[0].endswith('library.zip'): SYSPATH = os.path.split(sys.path[0])[0]
    else: SYSPATH = sys.path[0]

    try:
        if os.path.exists(os.path.join(SYSPATH, 'kombilo.app')):
            root.option_readfile(os.path.join(SYSPATH, 'kombilo.app'))
    except TclError:
        showwarning('Error', 'Error reading v.app')

    app = Viewer(root)
    print 'Step 3', time.time() - t

    root.protocol('WM_DELETE_WINDOW', app.quit)
    root.title('v.py')

    app.boardFrame.focus_force()
    root.tkraise()

    if len(sys.argv) > 1:              # load sgf file given as first argument
        app.openFile(os.path.split(sys.argv[1])[0], os.path.split(sys.argv[1])[1])
        app.changeCurrentFile(None, 1)
        app.delFile()

    if len(sys.argv) > 2:              # jump to move given as second argument
        try:
            for i in range(int(sys.argv[2])):
                app.next()
        except: pass
    print 'Step 4', time.time() - t

    root.mainloop()


When you invoke v.py, what does it print to the console? Maybe we can narrow down the problem a little in this way.

@Laman: thanks for your input. I agree that loading the databases should occur in the background, but it does not seem trivial to implement this because of the way the Python and C++ parts of the program are connected.


Best regards

Ulrich

Re: Kombilo 0.7.1

Posted: Thu Apr 12, 2012 12:55 pm
by ugoertz
Hello,

I just released Kombilo 0.7.2, see http://u-go.net/kombilo/. There have been several bug fixes, and some small additions (mouse wheel support to scroll through games, "always maximize window" option (on Windows), update of references to commentaries, ...).

Thanks everybody for the feedback!

Best regards

Ulrich

Re: Kombilo 0.7.1

Posted: Sat Apr 14, 2012 7:48 am
by RBerenguel
Well, this pinpoints a little the slowness:


Code: Select all

Step 1 1.80542612076
Step 2 2.39424014091
Step 3 89.2470321655
Step 4 89.2475252151

Re: Kombilo 0.7.1

Posted: Mon Apr 16, 2012 3:34 am
by ugoertz
Hi,

RBerenguel wrote:Well, this pinpoints a little the slowness:

Code: Select all

Step 1 1.80542612076
Step 2 2.39424014091
Step 3 89.2470321655
Step 4 89.2475252151


thanks for carrying this out. Unfortunately, this does not give a simple answer - the step which takes long is the one where most of the initialization process takes place. Currently the only way I see to proceed from here, would be to add further print statements to the __init__ method of the Viewer class (starting around line 2690). Even then, the end result could be that each of the initialization steps takes "too long".

It's really puzzling, how this can be so slow ...

Best regards,

Ulrich

Re: Kombilo 0.7.1

Posted: Mon Apr 16, 2012 4:18 am
by RBerenguel
Hi Ulrich,

I can't do it right now (I'm preparing a few network graphs in Gephi for work and will eat most of the day) but I'll set to do it when I find a few minutes to tinker with the file. I'm curious to find the slow part! I'm thinking about installing an X server and all required stuff in a remote machine (I use a 6sync VPS) to use Kombilo in my iPad and probably faster than in my Mac :/

Re: Kombilo 0.7.1

Posted: Mon Apr 16, 2012 12:35 pm
by ugoertz
For the next major version (0.8) I would like to add translations into other languages in addition to English to Kombilo.

If you would like to see Kombilo in your own language, and are willing to help, please have a look at http://u-go.net/2012/apr/16/i18n/.

Apart from translating the menu entries, window titles, etc., there naturally comes up the question whether the program should try to translate (part of) the information stored in the SGF files, when displaying it. E.g. if the result is given as "B+R" in an "English language" sgf file, it might be quite confusing in combination with a language where "B" stands for the white player (as French, say). What's a good way to go about this?

Best regards,

Ulrich

Re: Kombilo 0.7.1

Posted: Mon Apr 16, 2012 1:54 pm
by uPWarrior
ugoertz wrote:For the next major version (0.8) I would like to add translations into other languages in addition to English to Kombilo.

If you would like to see Kombilo in your own language, and are willing to help, please have a look at http://u-go.net/2012/apr/16/i18n/.

Apart from translating the menu entries, window titles, etc., there naturally comes up the question whether the program should try to translate (part of) the information stored in the SGF files, when displaying it. E.g. if the result is given as "B+R" in an "English language" sgf file, it might be quite confusing in combination with a language where "B" stands for the white player (as French, say). What's a good way to go about this?

Best regards,

Ulrich


I definitely wouldn't do that. You would need to detect the language in the SGF file (so you know when to translate) and the uncertainty might be way too big.
Further, translating comments in sgf files would probably annoy most players given the overall quality of most translation tools and it makes little sense to translate the "meta information" and not the comments themselves.

You can leave that as an options though.

Re: Kombilo 0.7.1

Posted: Sat Apr 21, 2012 1:34 pm
by ugoertz
Hello,

ez4u wrote:Date Profile
This is a great addition. I have spent the last few months working on this manually in excel. However, it should be part of the Export search results file instead. Working with GoGoD (at least) the granularity needs to be higher than it is possible to show in the lower right corner area. [...]


I have worked a little on extending the date profile feature. In Kombilo 0.8 you will be able to vary the granularity (up to 1-month intervals), as well as the time period which is considered. Furthermore, some date information for continuations can be displayed.

Here is a preview of how it looks at the moment. I would like to hear your feedback. Furthermore, I am not yet sure in which form this information should appear in the "Export search results" text: as a table, or would it be better to produce a chart diagram as an image file?

If you have suggestions, please reply here or email me.

Best regards

Ulrich

Re: Kombilo 0.7.1

Posted: Sun Apr 22, 2012 10:45 am
by RobertJasiek
Currently I still lack time to replace Kombilo 0.5 by 0.72 on my PC. Therefore my comments are on version 0.5; ignore if 0.72 has already solved the issues. I use Windows 7 64b.

1) The Save As dialog shows SGF but, for each file, one has to manually type ".sgf" so that the file gets its extension. Suggestion: automatically add the promised file extension.

2) The Save As dialog does not remember the last used path. Therefore tree walk is necessary for each file saved-as under another name. Suggestion: Remember the last used path. (If it cannot be stored permanently, remember at least as long as the current program instance is running.)

Re: Kombilo 0.7.1

Posted: Sat Apr 28, 2012 12:36 pm
by ugoertz
Hi Robert,

thanks for your comments.

RobertJasiek wrote:Currently I still lack time to replace Kombilo 0.5 by 0.72 on my PC. Therefore my comments are on version 0.5; ignore if 0.72 has already solved the issues. I use Windows 7 64b.

1) The Save As dialog shows SGF but, for each file, one has to manually type ".sgf" so that the file gets its extension. Suggestion: automatically add the promised file extension.


This was (surprisingly for me) a Linux/Windows issue. Should work in 0.7.3 on Windows too.

2) The Save As dialog does not remember the last used path. Therefore tree walk is necessary for each file saved-as under another name. Suggestion: Remember the last used path. (If it cannot be stored permanently, remember at least as long as the current program instance is running.)


This should work in 0.7.* already. (There is a situation where the path is not remembered, namely using "Export SGF". To fix that would be a little annoying, and since this does not seem to be a major use case, it currently has low priority ... please complain if you want to change this :) )

Best regards,

Ulrich

Re: Kombilo 0.7.1

Posted: Sun May 13, 2012 6:28 pm
by ez4u
The wildcard searching with shift-click seems to be broken in 0.7.2. For example:
This pattern does not give me back all Susaku Fuseki games with a White stone on one of the starred points in the upper left. Instead it returns 4 games in which the upper left is empty.
Click Here To Show Diagram Code
[go]$$B Search Pattern
$$+ - - - - - - - - - - - - - - - - - - - +
$$| . . . . . . . . . . . . . . . . . . . |
$$| . . . . . . . . . . . . . . . . . . . |
$$| . . . * . . . . . . . . . . O . . . . |
$$| . . . * . . . . . , . . . . . , X . . |
$$| . . . * . . . . . . . . . . . . . . . |
$$| . . . . . . . . . . . . . . . . . . . |
$$| . . . . . . . . . . . . . . . . . . . |
$$| . . . . . . . . . . . . . . . . . . . |
$$| . . . . . . . . . . . . . . . . . . . |
$$| . . . , . . . . . , . . . . . , . . . |
$$| . . . . . . . . . . . . . . . . . . . |
$$| . . . . . . . . . . . . . . . . . . . |
$$| . . . . . . . . . . . . . . . . . . . |
$$| . . . . . . . . . . . . . . . . . . . |
$$| . . . . . . . . . . . . . . . . O . . |
$$| . . X , . . . . . , . . . . . , . . . |
$$| . . . . . . . . . . . . . . . X . . . |
$$| . . . . . . . . . . . . . . . . . . . |
$$| . . . . . . . . . . . . . . . . . . . |
$$+ - - - - - - - - - - - - - - - - - - - +[/go]


Click Here To Show Diagram Code
[go]$$B Continuations
$$+ - - - - - - - - - - - - - - - - - - - +
$$| . . . . . . . . . . . . . . . . . . . |
$$| . . . . . . . . . . . . . . . . . . . |
$$| . . . * b . . . . . . . . . O . . . . |
$$| . . d * . . . . . , . . . . . , X . . |
$$| . . . * . . . . . . . . . . . . . . . |
$$| . . . . . . . . . . . . . . . . . . . |
$$| . . . . . . . . . . . . . . . . . . . |
$$| . . . . . . . . . . . . . . . . . . . |
$$| . . . . . . . . . . . . . . . . . . . |
$$| . . . , . . . . . , . . . . . , . . . |
$$| . . . . . . . . . . . . . . . . . . . |
$$| . . . . . . . . . . . . . . . . . . . |
$$| . . . . . . . . . . . . . . . . . . . |
$$| . . . . . . . . . . . . . . . . . . . |
$$| . . . . . . . . . . . . . . . . O . . |
$$| . . X , . . . . . , . . . a . , . . . |
$$| . . . . . . . . . . . . . . . X . . . |
$$| . . . . . . . . . . . . . . . . . . . |
$$| . . . . . . . . . . . . . . . . . . . |
$$+ - - - - - - - - - - - - - - - - - - - +[/go]


Statistics:
4 matches (4/0), B: 0.0%, W: 100.0%

By the way, it would be a great improvement for fuseki searches to be able to use separate wildcards for Black stones and White stones.

Re: Kombilo 0.7.1

Posted: Sun May 13, 2012 11:50 pm
by ugoertz
Dave,

thank you for the report.

ez4u wrote:The wildcard searching with shift-click seems to be broken in 0.7.2. For example:
This pattern does not give me back all Susaku Fuseki games with a White stone on one of the starred points in the upper left. Instead it returns 4 games in which the upper left is empty.
Click Here To Show Diagram Code
[go]$$B Search Pattern
$$+ - - - - - - - - - - - - - - - - - - - +
$$| . . . . . . . . . . . . . . . . . . . |
$$| . . . . . . . . . . . . . . . . . . . |
$$| . . . * . . . . . . . . . . O . . . . |
$$| . . . * . . . . . , . . . . . , X . . |
$$| . . . * . . . . . . . . . . . . . . . |
$$| . . . . . . . . . . . . . . . . . . . |
$$| . . . . . . . . . . . . . . . . . . . |
$$| . . . . . . . . . . . . . . . . . . . |
$$| . . . . . . . . . . . . . . . . . . . |
$$| . . . , . . . . . , . . . . . , . . . |
$$| . . . . . . . . . . . . . . . . . . . |
$$| . . . . . . . . . . . . . . . . . . . |
$$| . . . . . . . . . . . . . . . . . . . |
$$| . . . . . . . . . . . . . . . . . . . |
$$| . . . . . . . . . . . . . . . . O . . |
$$| . . X , . . . . . , . . . . . , . . . |
$$| . . . . . . . . . . . . . . . X . . . |
$$| . . . . . . . . . . . . . . . . . . . |
$$| . . . . . . . . . . . . . . . . . . . |
$$+ - - - - - - - - - - - - - - - - - - - +[/go]


Statistics:
4 matches (4/0), B: 0.0%, W: 100.0%


Just to confirm: you only get 4 games and no others? Those 4 games are valid hits, but of course there should be many others, and I checked that I do get them (a total of 635 games in GoGoD Winter 2011).

Did you maybe accidentally have "Next move" set to white?

By the way, it would be a great improvement for fuseki searches to be able to use separate wildcards for Black stones and White stones.


This is possible (assuming that it works correctly) by shift-clicking the green wildcard dot again (it will then turn black, and search for "black or empty"), or clicking once more (and it will turn white and search for "white or empty"). (Shift-clicking the white dot will remove the wildcard.)

I will think some more about what could have gone wrong with your search. It is very conceivable that it was caused by some Kombilo bug, I just have to find a way to reproduce it.

Best regards,

Ulrich

Re: Kombilo 0.7.1

Posted: Mon May 14, 2012 2:04 am
by ez4u
ugoertz wrote:...
Just to confirm: you only get 4 games and no others? Those 4 games are valid hits, but of course there should be many others, and I checked that I do get them (a total of 635 games in GoGoD Winter 2011).

Did you maybe accidentally have "Next move" set to white?

No my mistake was to use the house icon "reset game list" and forget that I had set a move limit of 5 in my previous search. :oops: It appears there is nothing wrong with the shift-click. Sorry about that!

Re: Kombilo 0.7.1

Posted: Wed May 23, 2012 12:26 pm
by ugoertz
Hello,

I just released Kombilo 0.7.3, see http://u-go.net/2012/may/23/kombilo073/. Apart from a few small fixes, the main addition is the possibility to retrieve a list of all duplicates (the search for duplicates spans all active databases).

Best,

Ulrich

Re: Kombilo 0.7.1

Posted: Mon Aug 06, 2012 12:36 pm
by ugoertz
Hello,

I just released Kombilo 0.7.4, see http://u-go.net/2012/aug/06/kombilo074/, which fixes a bug in the search algorithm which caused some partial board patterns to be missed by the search, under very special circumstances. Thanks to John Fairbairn for finding it and pointing it out to me.

Ulrich