Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

Premature optimization

Name: Anonymous 2017-06-27 6:31

Its been 15 minutes since "Search and replace" started on a 100k file i'm editing in gedit. Its still searching.
Why programmers assume their algorithms will never need to scale?

Name: Anonymous 2017-06-27 6:36

100k file
I've done similar operations on 100+ MB files with gedit.
They do choke on larger files, so when I'm editing 10GB SQL dumps, I use vim or emacs instead. So try that.

Name: Anonymous 2017-06-27 6:56

>>3
Why programs don't use something share like libgrep(hypothetical) instead of rolling their own shitty internal greps?

Name: Anonymous 2017-06-27 7:24

>>4
buying more RAM is easier

Name: Anonymous 2017-06-27 12:17

U MENA LIBPCRE

Name: Anonymous 2017-06-27 12:27

Name: Anonymous 2017-06-27 13:07

The offending function is
gtk_source_search_context_replace_all
https://github.com/GNOME/gtksourceview/blob/master/gtksourceview/gtksourcesearchcontext.c

Name: !Ep8pui8Vw2 2017-06-27 13:46

>>7
Somebody should write a compatibility layer.

Name: Anonymous 2017-06-27 22:16

Search and replace is an unsolved problem

Name: Anonymous 2017-06-28 2:12

>>10
no it's not

Name: Anonymous 2017-06-28 16:35

Not really following. Why would the algorithm be any worse than O(n)?

Name: Anonymous 2017-06-28 18:03

Name: Anonymous 2017-06-28 18:21

One word: FOSS

Name: Anonymous 2017-07-06 21:22

The mental midgets running our universities today don't know anything about algorithms. They would remove the bounds check on the search to make it faster.

Name: Anonymous 2017-07-06 21:39

>>8
Almost 4k lines? Seriously?

Name: Anonymous 2017-07-06 22:19

Should have done it as cat file | sed 's/find/replace/g'
In my experience doing things via unix tools is way faster than in the editor

Name: Anonymous 2017-07-06 22:29

Copying using nautilus/nemo some times took 10+ minutes while with cp/mv I did the same thing instantly.

Don't change these.
Name: Email:
Entire Thread Thread List