This question already has answers here:
How can I make Emacs start-up faster?
(17 answers)
Closed 9 years ago.
I was wondering if emacs performance would suffer if one has many implemented "but unused" functions in .emacs file.
Basically, are these functions loaded in memory "unnecessarily" and wait until they are used?
Also, is there anything one could do to improve speed and runtime of emacs?
The answers to your questions are "yes" and "yes" - please see the SO question how can i make emacs start up faster.
Other than start-up time, there's really no downside to having a "huge" .emacs file, unless you've got a tiny machine. People run Emacs for days/months, opening large numbers of files, and Emacs handles it all quite nicely.
Related
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
I'm currently using MatLab 6.5 (it's a 2004 version), because the custom code files I need aren't compatible with newer versions.
I'm wondering what are the necessary steps to update those files.
Thanks very much to everyone reading!
Ideally, those files have associated unit tests, so you could have an indication on whether each of them runs correctly or not. Probably not your case.
If you can, try having both Matlab versions on your machine, then have a copy of the file sets to modify and another copy just to inspect and run in the old version for reference.
If changes are expected to be made on a per file basis, then start by opening each file and checking warnings. As good practice, never leave warning in .m files, and suppress those that you'll be accepting nominally. I.e. put %#ok<NASGU> or other warning code but not simply %#ok. Most upgrade related issues are indicated by warnings. You can check the current folder for such problems with mlintrpt (see here)
Then, there is a compatibility tool codeCompatibilityReport, simply typing this will explore folders in your current workspace, and you might just use that if you expect changes in general to be minor or not to be needed for every file.
Now, for simple files, these should be everything you need, I"d expect that after some debugging and relearning, you'd have a much smoother experience with a recent version of Matlab than with a 10+ years old version. For shorter-term updates, I would recommend to avoid switching versions mid-project.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 7 years ago.
Improve this question
I started coding in Perl a few years ago. Back then I thought to simplify my code and make it more manageable I would group subroutines together in .pm files. For example, subs related to generating a report would go into "Report.pm".
Now I'm looking back on my code and since the vast majority of my subs are program-specific, I'm wondering if there's any valid reasons to do it the way I did? The programs I write are generally ~8K lines of code and my code runs (always) on very powerful servers. Today, the concept of having a main .pl file plus 5 *.pm files just seems like more files to manage and now I'm wondering if I should have just put it all into a single .pl file?
I'm not familiar with Perl, but to some extent this is similar in every programming language.
I see three reasons to split program into multiple files: productivity, reuse (which is badly-disguised productivity, or at least it should be) and clarity.
You say that you have only program-specific code, so you don't gain any reuse (at least external). My experience is that almost always generic things are already in some library and most of the code is program specific. With the size of the program it gets more important to reuse "internally", but only you can know whether you repeat yourself.
Productivity (in a more manual sense) depends on tooling. If you can click on a function call and jump to its definition, even in a different file, or rename it everywhere and most important, prepare a distribution without manually going through all the files, you don't think about having multiple files as an extra chore. If you don't have those things, each extra files bring extra work.
Clarity - If you have everything in one file, it's much easier to create one huge monolith that depends on lot of things and after a while it is hard to change. If you split it into reasonable modules where you can test "leaf" modules independently, you will have a much easier time refactoring and changing when requirements change.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I want to learn scheme using 'Teach yourself scheme in fixnum days' in order to customize reports generated by GnuCash. I am using a windows computer. When I type M-X run-scheme in emacs the response I get is 'Searching for program: permission denied, scheme'. I have done some googling and found that I should put some info in a .emacs file (I am pretty sure this does not exist yet) at location: C:\Users\Steve\AppData\Roaming. The instruction was to add some lines including (setq scheme-program-name "scm") where "scm" is replaced by the name of the scheme interpreter in my installation of emacs.
I have not been able to find the name of my scheme interpreter and also I am very unsure about the whole procedure being new to emacs and scheme. Any specific and / or general guidance here would be very much appreciated, Steve
You computer probably does not come with a Scheme program; thus, you'll need to install one. Do a Web Search; plenty of Scheme implementations for Windows. Once you install it just use it outside of Emacs. That is, take it step by step - get some familiarity with Scheme, then get some experience with Emacs, then combine the two.
Ooh, let me add to that; I believe that Gnucash uses Guile, the GNU scheme implementation. That's the one you're probably interested in.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
Environment: Win7::x64/Emacs24.2.50.1-mingw, 3 opened frames, ~10-20 opened buffers with code (no smart autocompletion/etags/etc) and dired buffers (~ 50% / 50%). Average memory consumption ~25-50Mb. No extra packages from MELPA (or similar) loaded.
When Emacs is not closed for several days (mostly that happens after 3 days), Emacs does not follow my input from a keyboard: everything what was typed in is shown with an annoying delay. Switching between buffers has also a noticeable delay.
What I tried during the slow responsiveness of Emacs:
Killed all buffers
M-x garbage-collect
But these did not work for me. The only way is to restart the application again. The memory consumption is still the same.
Are there any ideas/best-practices how to prevent such issues? Possibly unload and load again all packages? Or something else?
Thanks!
Since you are using Emacs 24.X, I suggest you to execute profiler-start once your instance becomes so slow. Use mode cpu. Use emacs for some seconds and type M-x profiler-report and look at the results.
With luck, you will find the "culprit". If that does not help, and bisecting is expensive because of the "three days" wait, I would follow #Drew advice of upgrading to a newer non snapshot of Emacs
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
I'm new to emacs and I find it hard to make decisions on which extension to choose. Too many choices I say. The same pattern is true when I first started to use linux (choosing a distro, choosing packages to install, etc.)
I'm now faced with the dilemma of choosing between autocomplete and company. Both are emacs extensions that provide completion mechanisms for emacs. I may decide to use autocomplete because I think it's much more mature, and because of AutoJavaComplete which requires autocomplete. However, company mode also seems to be good, and some users report that it's much better than autocomplete. It lacks documentation though, which I rather find daunting.
Basically, I just want "intellisensy" completion when writing code. Which among the two is a better choice for this?
The latest company-mode release is 12 hours old as I'm writing this. Recent work focused on bugfixing, as well as some nice new features.
I encourage you to try it, I think it provides better user experience than auto-complete.
You can feed company backends to auto-complete, and the compatibility is probably possible in the reverse direction too - so your choice may not be too critical.
What comes out of discussions at the emacs wiki is that CompanyMode is older, and there is at least one mention of bugs in favor of auto-complete. Indeed, it seems auto-conplete is what the cool kids are using these days, and repository on github shows active development. The latest version of company, on the other hand, is nearly 11 months old.