app hangs when switching pages #3

Closed
opened 2022-06-25 16:54:40 +00:00 by yagich · 2 comments
Owner

steps to reproduce:

  1. start the server, selecting the server_files folder
  2. open the page and go to index
  3. select second article in the sidebar
  4. switch back to first article
  5. app hang
steps to reproduce: 1. start the server, selecting the `server_files` folder 2. open the page and go to index 3. select second article in the sidebar 4. switch back to first article 5. app hang
yagich added the
bug
label 2022-06-25 16:54:40 +00:00
Author
Owner

the issue is with second.md, which contains an image, and line 79 in Main.gd:

var data = f.get_as_text() if mime.type == 'text' else f.get_buffer(f.get_len())

f.get_buffer() seems to be blocking, and the png image is quite big. changing the image to dogpepsi.jpg will make it load faster, and the page can be switched then.

it looks like we will have to do file streaming after all

the issue is with `second.md`, which contains an image, and [line 79 in `Main.gd`](https://git.poto.cafe/yagich/ticle-godot-frontend/src/branch/main/Main.gd#L79): ```gdscript var data = f.get_as_text() if mime.type == 'text' else f.get_buffer(f.get_len()) ``` `f.get_buffer()` seems to be blocking, and the png image is quite big. changing the image to dogpepsi.jpg will make it load faster, and the page can be switched then. it looks like we will have to do file streaming after all
Author
Owner

closed in #7

closed in #7
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: yagich/tickle-godot-frontend#3
No description provided.