quickly-talk team mailing list archive
-
quickly-talk team
-
Mailing list archive
-
Message #00163
Re: optimum folder for post_create.py etc
-
To:
quickly-talk@xxxxxxxxxxxxxxxxxxx
-
From:
Didier Roche <didrocks@xxxxxxxxxx>
-
Date:
Mon, 13 Aug 2012 11:57:15 +0200
-
In-reply-to:
<CACfMNZt4999i=BbHjmn5Rh7eoXBiafht2NVJCbSN1Qh0aGQBkQ@mail.gmail.com>
-
User-agent:
Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20120724 Thunderbird/15.0
Le 13/08/2012 11:22, tony byrne a écrit :
Can you please shed some light on it? :)
I found it in an old email.
"(I'm still pondering if we shouldn't put as well the custom templates
here: like
~/.config/quickly/templates/ubuntu-application/foo-template
but I'm unsure about the discoverability TBH)"
Didier Roche <didrocks@xxxxxxxxxx> 10 August 2012 07:04
Yeah, it was some kind of a typo.
What we can do to merge this proposal about builtins and additional
commands with the one discussed on another thread is:
* hooks that are per project lived inside the project as you agreed on
the previous email.
* if you add a command in
~/.config/quickly/templates/ubuntu-application/
The command will be added to the existing ubuntu-application context. If
you add a command name which already exist for this template (like
"release"), it will override the system command and will be used instead.
* you can add per-template hooks in the same directory, those hooks will
be executed in the same context.
* if you use:
~/.config/quickly/templates/builtins/
The virtual "builtins" template will see those additional commands
available in all template, you can also add hooks here and handle the
context the same way that other templates.
I think if we agree on this design (which will help keep a sane quickly
core with this layering levels), we can as well rename then "builtins"
to "all" as the virtual template. What do you think?
To simplify the structure as well, I'm in favor of thinking of a way to
remove the commandsconfig file and have the metadata inside the command
class itself. I made some tests last week importing dummy files and
parsing them, checking that there is a class inheriting from the
"Command" class, and the results are quite promising (with compiled
files, meaning the .pyc files are here), for 50 files:
- ~20ms on a i7, ssd.
- ~60ms on a intel atom, hard drive.
Going from 50 files to 10 files only removes some milliseconds on
compiled files, but no in any drastic way. I'm quite confident it can scale.
Of course, without compiled files, the experience when compiling them is
not nice:
- ~100ms on a i7, ssd.
- ~500ms on a intel atom, hard drive.
but that's not an experience that people will have to endure as we will
ensure the templates are compiled into their directory.
Those values are particularly important on the auto-completion performing.
Didier
Follow ups
References