satyagraha / gfm_viewer

An Eclipse plugin providing an accurate view of GitHub Flavored Markdown (.md) files
95 stars 27 forks source link

Eclipse freezes for 5-15 seconds if .md document has several (big) pictures #4

Closed paulvi closed 11 years ago

paulvi commented 11 years ago

Eclipse 4.2.1 and 4.3.0.RC2 are freezing for 5-15 seconds if .md document has several (big) pictures.

General experience with plugin that it makes Eclipse very slow, when saving .md file with opened GMF View.

satyagraha commented 11 years ago

Interesting problem, I'll take a look.

satyagraha commented 11 years ago

There are several issues here (probably).

  1. Support for local (relative) images, i.e. those within a GitHub project, is broken. This is because the created transformed HTML file is in a different directory (Java temporary) to the original markdown file - hence relative links are completely wrong. The facility to have relative links was added to GitHub fairly recently after much user demand, btw, so is good to have. One proposed solution would be to store the transformed HTML file in the original source folder using the filename pattern .orignal.md.tmp. Filenames begininng with . are ignored by most Eclipse views, and users can add *.tmp as a global gitignore to avoid them being proposed for VC addition. Alternatively, I could attempt to transform relative links in the temporary HTML to be correct w.r.t. the orignal .md file.
  2. I don't find any particular delay with large local or remote images - some clarification required here. Great firewall of China issue?
  3. I accept that the markdown transformation should not be done on the GUI thread, and it will be quite straightforward to use the Eclipse Jobs API to schedule the work to be done as a background task. This will ensure the UI remains responsive.

Comments welcome.

paulvi commented 11 years ago

Hi Satyagraha

  1. As you like. There is no standard conventions I know.
  2. I am in Beijing. Network connection varies. By the way, where are you?
  3. Making transformation in non-GUI Thread, but as background task, should be main think of next version. All other thing can wait.

On 17.06.2013 6:12, satyagraha wrote:

There are several issues here (probably).

  1. Support for local (relative) images, i.e. those within a GitHub project, is broken. This is because the created transformed HTML file is in a different directory (Java temporary) to the original markdown file - hence relative links are completely wrong. The facility to have relative links was added to GitHub relatively recently after much user demand, btw, so is good to have. My proposed solution would be to store the transformed HTML file in the original source folder using the filename pattern .orignal.md.tmp. Filenames begininng with . are ignored by most Eclipse views, and users can add *.tmp as a global gitignore to avoid them being proposed for VC addition. Alternatively, I could attempt to transform relative links in the temporary HTML to be correct w.r.t. the orignal .md file.
  2. I don't find any particular delay with large local or remote images - some clarification required here. Great firewall of China issue?
  3. I accept that the markdown transformation should not be done on the GUI thread, and it will be quite straightforward to use the Eclipse Jobs API to schedule the work to be done as a background task. This will ensure the UI remains responsive.

Comments welcome.

— Reply to this email directly or view it on GitHub https://github.com/satyagraha/gfm_viewer/issues/4#issuecomment-19520109.

satyagraha commented 11 years ago

Just pushed v1.1.0, which covers:

  1. Now use original markdown file directory by default which makes relative links and images work.
  2. I am in UK.
  3. Now does transformation in background job.
paulvi commented 11 years ago

Do you need help with release and hosting?

satyagraha commented 11 years ago

This issue remains active as #1 , let me think about it for a bit.

paulvi commented 11 years ago

I am going to release Nodeclipse NTS (Eclipse distribution) based on Enide solution http://www.nodeclipse.org/enide right after Kepler release.

I would be nice if I could included gfm_viewer 1.1