I'm curious about the Emacs architecture. Do you know where are the structures for keeping opened text file? Where are the main functions for opening, editing and closing text files? How in general terms text is stored.
I once opened one xml file, which was 100 MiB large and had only two lines of text. Then I typed a character in the large one, emacs stopped reacting for a several minutes with a 100% cpu usage. So, I guess, emacs did kept that 100 MiB line as a single memory block, and moved 99.999999 of them to the right then this happened. I'm curious where exactly in the code this happened, what's the file name + function name.