On 10/18/19 8:10 AM, Edward K. Ream wrote: > #1348 <https://github.com/leo-editor/leo-editor/issues/1348> has been > closed, but I'm not sure of its status. > > gnx clashes are a recurring theme when using Leo (or the bridge) to > spawn many other copies of Leo quickly. > > I am wondering whether these clashes might be avoided if Leo would use a > separate user id for each spawned copy. This might be done either with > a --id=x command-line option or with a kwarg to runLeo.py. > > What are your thoughts? > > Edward
I think changing the user id is a bad solution. It would make a mockery of what the user thinks the user id is. Besides, I doubt that a new user id can be generated in a way that guarantees no conflicts. The fix should not require the user to do anything because depending on unreliable users is no fix at all. My preferences are as follows from most preferable to least preferable. My preferences are, of course, based on my limited understanding of Leo-Editor. 1) Eliminate the generation of a GNX before reading a file. Since the hidden root node always has GNX hidden-root-vnode-gnx, the motivation for this GNX generation is very mysterious to me. It seems reasonable to me, that if a file exists, then it should be read before generating any GNX that might affect Leo-Editor's handling of the file. If the file is read and all of its GNX's are known, then avoiding duplicates is a solved problem. 2) Replace the current non-random GNX with a pseudo-random UUID. Python 2.5 and up has a library uuid. I like library shortuuid: https://pypi.org/project/shortuuid/ But you seem emotionally committed to your non-random GNX's, even though, so far as I know, no one has ever made any significant use of the information they contain. I look forward to your fix of this important-to-me problem. No matter what your fix is. -- Segundo Bob [email protected] -- You received this message because you are subscribed to the Google Groups "leo-editor" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/leo-editor/22dc43cb-be85-7913-ba2c-8270f683fea1%40gmail.com.
