7 ms·
Totally agreed. I think it's absolutely a best practice to set limits. Code is generally designed to operate within certain "reasonable" performance boundaries
by crazygringo 4y ago
Totally agreed. I think it's absolutely a best practice to set limits.
Code is generally designed to operate within certain "reasonable" performance boundaries, and when it goes outside those you need to think whether code should be rewritten to accomodate it.
Just a tiny example, but I regularly deal with long (800+ page) PDF's on my iPad, reading parts of them in the stock Books app. When I select text to highlight, the context menu unfortunately puts "select all" directly next to "highlight". Of course, every so often I accidentally hit "select all", and then I have to force-close the app because otherwise it just freezes for 10 minutes as it extracts and selects the text on every single page.
When really, it needs a limit to detect that, hey, if the PDF is over 20 pages long then just don't allow "select all" anymore, because this isn't the right tool for the job.
- psychphysic 4y agoAlthough that's also ripe for the annoyance of not being able to select all in border cases. I'm much in favour of don't fuck with the basics (i.e. the core expect feature UI like select, copy and paste.).
- deleted 4y ago[deleted]
- bee_rider 4y agoMaybe “select all” is too easy to click? Might make sense to put it in the “…” menu, and have a “Select All On Page” button front-and-center.
- iudqnolq 4y agoThe ideal solution to this is the pattern of turning decisions that have to be thought about before you click the button into decisions that can be easily undone. In this case detect the pathological case and spawn a separate thread that computes the text. Show a progress indicator and an easy cancel button. Of course, that's harder to implement.
- DougBTX 4y agoA soft limit would work well here, a prompt saying, “There are a large number of pages, it will take a while to select them all. Do you want to continue?” then it informs the user, rather than (maybe) artificially limiting them.