walles / moar

Moar is a pager. It's designed to just do the right thing without any configuration.
Other
587 stars 17 forks source link

moar pager not showing complete content of big files #78

Closed ciscohack closed 2 years ago

ciscohack commented 2 years ago

Hi Expert,

Today while using moar app for reading big size log which have 8339 lines log file moar skipped the output of last few lines even moar search was not producing any result but same time when i open the very same file in normal text editor like BBedit .. it's showing complete context of file thats how i came to know moar is skipping file contents. this seems to be a bug or buffer limit .. i don't know. please have a look.

I am running moar version 1.8.4 on macOS 12.1.

here in below screenshot you can see moar is telling this file have 8339 lines but it skipping the lines only 8338 and missed last one ...Also when i was searching Dec 23 in this file search result was saying no match found which is strange. I can't share this complete file as it have some sensitive data

image

walles commented 2 years ago

I don't see how I can debug this without an example file.

Could you censor sensitive data from your file somehow and upload a censored file?

That censored file obviously needs to repro the problem.

I have tested moar with 500MB files, so the file size itself shouldn't be a problem.

ciscohack commented 2 years ago

I don't see how I can debug this without an example file.

Could you censor sensitive data from your file somehow and upload a censored file?

That censored file obviously needs to repro the problem.

I have tested moar with 500MB files, so the file size itself shouldn't be a problem.

Hmm, okay i can understand. i would have attached the logs if possible but due to some limitation i thought just to report the issue in case you able to find something. Anyway i will see if i can share the log but chance is less. i don't know why moar search is also failing in this case

ciscohack commented 2 years ago

@walles I am noticing slowness in moar while search along with chromaterm syntax highlight. Second slowness is more with moar style option.

AndydeCleyre commented 2 years ago

I don't know if this is the same issue, but I'm seeing moar truncate the content of a json file consisting of a single very long line (28,916 characters, I think).

It might be worth noting that I tried moar on it just because I found horrible performance when feeding it, externally highlighted, to less.

depcache-cp3.9.json.txt

walles commented 2 years ago

@AndydeCleyre thanks for providing a repro case!

I just tried opening your file, and holding down my right arrow button eventually took me all the way to the end of that long line.

What exact steps did you take to see moar truncate it?

walles commented 2 years ago

@walles I am noticing slowness in moar while search along with chromaterm syntax highlight. Second slowness is more with moar style option.

@ciscohack can you open a separate ticket about this?

AndydeCleyre commented 2 years ago

Oh:

walles commented 2 years ago

@AndydeCleyre those are actually two issues, and I can confirm both.

When I implemented wrapping it turned out to be complex, and I knowingly left out the wrapped-line-doesn't-fit-on-one-full-screen case, until somebody ran into it. You just did and I'll see what I can do.

Regarding the search, the search will never scroll sideways. Same thing there, waiting for somebody to complain and you just did, I'll see what I can do.

Old sins catching up :)

walles commented 2 years ago

@AndydeCleyre in 1.9.0 (just released) you can scroll to the bottom with wrapping in your example file: https://github.com/walles/moar/releases/tag/v1.9.0

walles commented 2 years ago

@ciscohack if you page the same file using the same version of moar but...

... do you still see the same symptom?

ciscohack commented 2 years ago

@walles Sorry haven't tested further as i am traveling and don't have system access. please close the ticket. i will re-open if need. Thanks

walles commented 2 years ago

Closing as requested.

@ciscohack feel free to reopen after trying with the default macOS Terminal and without Chromaterm.