Ubuntu Forums ubuntu.com - launchpad.net - ubuntu help  

Go Back   Ubuntu Forums > The Ubuntu Forum Community > Other Community Discussions > Development & Programming > Programming Talk
Register Reset Password Forum Help Forum Council Search Today's Posts Mark Forums Read

Programming Talk
This forum is for all programming questions.
The questions do not have to be directly related to Ubuntu and any programming language is allowed.

 
Thread Tools Display Modes
Old May 28th, 2006   #1
rplantz
Dipped in Ubuntu
 
Join Date: Jul 2005
Location: Northern CA
Beans: 569
Ubuntu 9.10 Karmic Koala
emacs slow startup

I used Options->Customize Emacs to create a ~/.emacs file that provides me a larger font size. When emacs starts, it takes 6 - 7 seconds to resize the window then fill it with the larger text. I'm running this on an amd64 athlon 3200. The same thing in gedit is instantaneous.
__________________
Intel i7-920; Nvidia GT 220, 1GB; MSI X58 Pro-E; 6GB DDR; 64-bit mode.
rplantz is offline   Reply With Quote
Old May 29th, 2006   #2
kunnk
Spilled the Beans
 
Join Date: May 2006
Beans: 14
Re: emacs slow startup

I have exactly same problem btw. My main programming language is java but i tried to learn a little more lisp (just for fun, not for real coding of course). Installed emacs and slime. Because default emacs is ugly i tried some customizations like changing font and colors, after that emacs startup is terribly slow.
kunnk is offline   Reply With Quote
Old May 29th, 2006   #3
Zippo1000
First Cup of Ubuntu
 
Join Date: Apr 2006
Beans: 5
Re: emacs slow startup

Exactly the same problem here.
I used Emacs on Dapper Drake for a few months. I always made the updates and then suddenly the emacs startup became very slow. I think it has something to do with Gnome, because with other window managers like IceWM, Fluxbox or LarsWM there's no problem.
I also recognized that the startup is very slow when you have customized emacs, like font size, window size, ...

Perhabs someone has a solution to the problem! I think it has something to do with Gnome as I wrote above, but I'm not sure, and especially no expert in this.

Please help,
Zippo
Zippo1000 is offline   Reply With Quote
Old June 4th, 2006   #4
harfooz
First Cup of Ubuntu
 
Join Date: Jan 2006
Beans: 5
Re: emacs slow startup

Try this line in your .emacs file:
Code:
(modify-frame-parameters nil '((wait-for-wm . nil)))
There is some request to the window manager that is not sending a response back to emacs. This line fixed the problem for me.

Hope this helps,
Clint
harfooz is offline   Reply With Quote
Old June 5th, 2006   #5
Burke
A Carafe of Ubuntu
 
Burke's Avatar
 
Join Date: Sep 2005
Location: Canada
Beans: 134
Ubuntu 6.06
Re: emacs slow startup

Awesome! I've been wondering about that! Thanks very much.
__________________
Mobile AMD Athlon 64 4000+; 1024MB DDR; 100GB / 160GB(external); Dual-layer DVD+/-R(W); Radeon X600
Burke is offline   Reply With Quote
Old June 5th, 2006   #6
bites
Just Give Me the Beans!
 
Join Date: Dec 2005
Beans: 14
Edgy Eft Testing
Re: emacs slow startup

eey.. thanks Harfooz! It's been a while since I used emacs, but I had this problem as well
bites is offline   Reply With Quote
Old June 5th, 2006   #7
rplantz
Dipped in Ubuntu
 
Join Date: Jul 2005
Location: Northern CA
Beans: 569
Ubuntu 9.10 Karmic Koala
Re: emacs slow startup

Quote:
Originally Posted by harfooz
Try this line in your .emacs file:
Code:
(modify-frame-parameters nil '((wait-for-wm . nil)))
Thank you! BTW, placing the line at the end of my .emacs file did not work; I had to place it at the beginning.
__________________
Intel i7-920; Nvidia GT 220, 1GB; MSI X58 Pro-E; 6GB DDR; 64-bit mode.
rplantz is offline   Reply With Quote
Old June 6th, 2006   #8
toojays
Ubuntu Extra Shot
 
toojays's Avatar
 
Join Date: Jan 2005
Location: Adelaide, Australia
Beans: 340
Send a message via ICQ to toojays
Re: emacs slow startup

By the way, this is bug 23005.
toojays is offline   Reply With Quote
Old January 4th, 2007   #9
lukew
Ubuntu Extra Shot
 
lukew's Avatar
 
Join Date: May 2006
Location: UK
Beans: 383
Ubuntu 8.10 Intrepid Ibex
Send a message via MSN to lukew Send a message via Yahoo to lukew
Re: emacs slow startup

Quote:
Originally Posted by harfooz View Post
Try this line in your .emacs file:
Code:
(modify-frame-parameters nil '((wait-for-wm . nil)))
There is some request to the window manager that is not sending a response back to emacs. This line fixed the problem for me.

Hope this helps,
Clint
Great Stuff! Thank You!!

If you have lots of emacs customisation you can byte compile the el files into elc files to make you custom code run quicker!

Luke

Code:
(defun lw:byte-compile-directory(directory)
  "Byte compile every .el file into a .elc file in the given directory.  See
`byte-recompile-directory'."
  (interactive
   (list
    (read-file-name "Lisp directory: ")))

  (byte-recompile-directory directory 0 t))
__________________
Registered Linux User #219690 @ Linux Counter, http://counter.li.org.
lukew is offline   Reply With Quote
Old February 12th, 2007   #10
robbiemorrison
First Cup of Ubuntu
 
Join Date: Feb 2007
Location: Berlin, Germany
Beans: 2
Ubuntu 6.10 Edgy
Re: emacs slow startup

Hi all

My experience is somewhat similar to that discussed earlier:

- 1 second to load Emacs when connected to university
ethernet

- 6 seconds to load Emacs without ethernet

- 1 second to load Emacs whenever some unknown and
evidently insecure WLAN in my apartment block was
detected

- Gnome also equally slow to start, particularly the
first icon on the splashscreen (whatever that is)

- emacs -q and/or -nw make no difference to speed

- adding the following line to ~/.emacs did nothing
(modify-frame-parameters nil '((wait-for-wm . nil)))

- instantaneous response : $ hostname
takes several seconds : $ hostname --short

My fix was to modify /etc/hosts as follows:

127.0.1.1 sojus # was 'robbie-laptop'

My domain name is sojus.****.tu-berlin.de. The phrase
'robbie-laptop' arose from the Live Ubuntu DVD install
process. At one point I naively entered:

computer name = robbie-laptop

Later during the install /etc/hostname was modified to
achieve ethernet connectivity (but /etc/hosts remained
unexamined and untouched):

sojus # was 'robbie-laptop

It is my belief that the request for a computer name
during installation should be more explicit and state
that the domainname is sought and not some cute
identifier.

My system details for the record:

- hardware : Toshiba Tecra A2 330 laptop
part no : PTA20A - 028002
purchase : 27-Aug-2004
some specs :

Celeron mobile 1.4 GHz / 512 MB RAM (originally 256 MB)
10/100 ethernet (Intel 82801DB PRO/100 VE (MOB) Ethernet Controller (rev 83))
802.11b/g WLAN (Intel PRO/Wireless 2200BG Network Connection (rev 05))

- distro : Ubuntu 6.10
- kernel : 2.6.17-10-generic

- emacs version : 21.4.1
package : emacs 21-0ubuntu2
fonts : default fonts used, no .Xdefaults or elisp modifications

Hope this helps. Many thanks, as always, to the Linux
community.

Robbie Morrison
robbiemorrison is offline   Reply With Quote

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 06:17 AM.


vBulletin ©2000 - 2010, Jelsoft Enterprises Ltd. Ubuntu Logo, Ubuntu and Canonical © Canonical Ltd. Tango Icons © Tango Desktop Project. lingonberry