-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
slow in my environment #15
Comments
Hi @TinoPlayStuff, thanks for the feedback. I didn't think about the speed for now. In general I would expect Could you add a reproducer for your issue? I. e. some sample requests and how fast they are on your machine with curl and joppy? I couldn't observe a big difference when using sessions in the testsuite, but this could be due to the testsuite structure. |
in run_py.zip, there are two python scripts, run.py and run_request.py. To run them, you have to put your joplin token in run.py.tok # <- setting
TOK_FILE = "run.py.tok" # file contains joplin token
PUBTAG = "published" # note with this tag will be extracted
TAGHIDE = {"published", "publishedx"} # test tag
N_FDR = "./_posts" # where to put the exported posts
R_FDR = "./_resources" # where to put resource files (.jpg, .png, ...)
URL = "http://localhost:41184/"
# -> setting with such setting, all notes with tag "published" (defined as PUBTAG) and related resource files will be put into ./_posts and ./_resources (defined as N_FDR and R_FDR respectively) the joppy in this zip is modified to use requests.session |
Unfortunately I couldn't run your script out of the box. It's recommended to pass the However, I did a "dry" look at the script. Notes:
|
Thanks for your explanation. Today I made some modifications and ... ... The main modification is that I now use FYI, I ran these scripts on a windows 11 machine with python 3.7. Without session, it takes more than one second to deal with one note and related resource files. Thanks again for your convenient api |
hi,
I tried this api, its very convenient but relatively slow.
So I modify it to use "session":
import requests
asIt's much faster now, but still slower than using
subprocess.Popen
to call curl for the same thing.Is this the limitation of the python requests module or maybe I did something wrong?
The text was updated successfully, but these errors were encountered: