5digits / dactyl

Pentadactyl and other related Gecko extensions
Other
468 stars 98 forks source link

Many entries being added to local-marks file #158

Open wshanks opened 8 years ago

wshanks commented 8 years ago

I don't use local marks, but I noticed recently that the local-marks file in the info directory was over 1 MB in size. It seems to have a lot of websites I have visited in the past in it all with the mark '. Here is one such entry:

    "http://www.nytimes.com/":{"'":{"location":"http://www.nytimes.com/","offset":{"x":0,"y":81},"path":"/html[1]","timestamp":1462220339646000}}

It seems like just visiting a website does not create an entry but doing any scrolling on the website does (for that example entry, I just scrolled down a few times with j and then did gg). Is this the expected behavior or is something about local marks not working properly?

FLHerne commented 8 years ago

Same here, using FF45.

Mine's only 180KB, so it can't have been happening for very long.

wshanks commented 8 years ago

On another computer I do more browsing on the file is 4 MB. I haven't had a chance to search in the code for where these entries are generated, but we might be able to figure out roughly when it started by parsing the time stamps.

Edit: Actually, it was easy to find where in the code the marks are created:

https://github.com/5digits/dactyl/blob/master/common/content/marks.js#L42

It's just using Date.now() * 1000. So I'll try to write something to parse the local-marks file and turn all the time stamps into date strings to see what the time period looks like.

wshanks commented 8 years ago

I plotted the time stamps and they were spread fairly evenly over the last three years, so I guess this behavior has been around for a while. I guess it is saving the last scroll position for every site that is scrolled on. Whether or not that is useful I guess is one question (I don't see the point of saving that information for longer than one session). However, the marks don't seem to work for me. I tried going to a few sites with a non-zero scroll position saved and doing '' and nothing happend.