Skip to content
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

"Create new wiki" extremely slow on MacOS #266

Open
michaeljmcd opened this issue Jan 13, 2023 · 5 comments
Open

"Create new wiki" extremely slow on MacOS #266

michaeljmcd opened this issue Jan 13, 2023 · 5 comments

Comments

@michaeljmcd
Copy link

Running TiddlyDesktop v0.0.16 on macOS Ventura 13.1, creating a new wiki ("Create new wiki" > "Empty tiddly wiki file") runs extremely slowly. It takes over 10 minutes to complete. If I check the create directory, I see a small (600-700kb) file created right away and then the full wiki much later (the first time I noticed this, I assumed it would never complete, deleted the file and a broken wiki window popped up minutes later).

Some other notes:

  • I don't think internet speed is the blocker. I can go to tiddlywiki.com and download empty.html in seconds - it definitely doesn't take minutes to pull the template file.
  • The wikis I was creating were on OneDrive, but I don't experience any trouble with OneDrive + TiddlyDesktop on existing wikis. The same thing also occurs if I create the new wiki in Downloads which isn't a cloud storage location.
  • After the wiki does create, it gets rendered strangely into the UI.

image

@Jermolene
Copy link
Member

Thanks @michaeljmcd. I'm also on Ventura 13.1 with decent download speeds, and I'm seeing the same 10s or more delay when creating a new wiki. As you say, the new wiki is being downloaded from the internet, but it shouldn't be that slow. I assume there's a problem with the code that downloads and saves the file. I'll investigate.

WindowList.prototype.cloneWebToPath = function(source,dest) {
var protocol = source.substr(0,5) === "https" ? https : http,
file = fs.createWriteStream(dest);
protocol.get(source,function(response) {
var stream = response.pipe(file);
stream.on("finish",function() {
$tw.desktop.windowList.openByUrl("wikifile://" + dest);
});
stream.on("error",function(err) {
$tw.desktop.utils.alert("Error: " + err);
});
});
};

After the wiki does create, it gets rendered strangely into the UI.

That seems to be a layout issue if the window is too narrow – @Telumire might that be related to the recent CSS updates?

@Telumire
Copy link
Contributor

Telumire commented Jan 13, 2023

Hi @Jermolene ! I tried to reproduce the issue with the latest release (tiddlydesktop-win64-v0.0.16) but the creation of a new wiki take about 1 or 3 seconds, which is about the same delay than what I'm accustomed to. Beside the only thing that I modified for the update was the tiddlers relate to the wiki list so I dont see how this could impact the creation of a new wiki ? I'm on windows 10 by the way, maybe this has something to do with nw.exe ?

2023-01-13.20-58-19.mp4

And the UI looks fine on my side:

image

@Jermolene
Copy link
Member

Apologies @Telumire – I think the 2nd issue (the one illustrated by @michaeljmcd in the OP) is actually a long-standing layout issue that is triggered when the wikilist window is too narrow to fit the pathname. Presumably the fix is to turn on CSS wordwrap for those strings.

The 1st issue (the performance of downloading an empty wiki from tiddlywiki.com) appears to only affect macOS.

@Jermolene
Copy link
Member

The 1st issue (the performance of downloading an empty wiki from tiddlywiki.com) appears to only affect macOS.

To verify that the problem doesn't lie with the https://tiddlywiki.com infrastructure, I added a new template with a TiddlyHost wiki as the URL, and still experienced the same stalling in the download. I'll try upgrading to the latest nw.js.

@JHonaker
Copy link

The 1st issue (the performance of downloading an empty wiki from tiddlywiki.com) appears to only affect macOS.

@Jermolene I can add some evidence that it's not isolated to macOS. I have a Windows 10 machine for work. The "Create from a Template" buttons for both prerelease and release create a 0 byte file immediately, but I haven't been able to successfully download a wiki via them.

Adding a wiki file that's been downloaded externally works perfectly well though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants