From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Michael Heerdegen Newsgroups: gmane.emacs.devel Subject: Re: What does all-completions with COLLECTION == obarray return? Date: Sun, 05 Apr 2015 20:48:47 +0200 Message-ID: <87iodaxvg0.fsf@web.de> References: <87k2xr7skh.fsf@web.de> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1428259755 22298 80.91.229.3 (5 Apr 2015 18:49:15 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 5 Apr 2015 18:49:15 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Apr 05 20:49:06 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YepbV-0005Xg-JG for ged-emacs-devel@m.gmane.org; Sun, 05 Apr 2015 20:49:05 +0200 Original-Received: from localhost ([::1]:37328 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YepbV-00033G-1Q for ged-emacs-devel@m.gmane.org; Sun, 05 Apr 2015 14:49:05 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45413) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YepbR-000330-RC for emacs-devel@gnu.org; Sun, 05 Apr 2015 14:49:02 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YepbM-0004xD-S5 for emacs-devel@gnu.org; Sun, 05 Apr 2015 14:49:01 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:44769) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YepbM-0004x6-Kg for emacs-devel@gnu.org; Sun, 05 Apr 2015 14:48:56 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1YepbK-0005Qr-Fe for emacs-devel@gnu.org; Sun, 05 Apr 2015 20:48:54 +0200 Original-Received: from dslb-092-074-176-137.092.074.pools.vodafone-ip.de ([92.74.176.137]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 05 Apr 2015 20:48:54 +0200 Original-Received: from michael_heerdegen by dslb-092-074-176-137.092.074.pools.vodafone-ip.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 05 Apr 2015 20:48:54 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 50 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: dslb-092-074-176-137.092.074.pools.vodafone-ip.de User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) Cancel-Lock: sha1:R7LazA6Hl+ALWk9hbtEC8BwxkvU= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:184964 Archived-At: Stefan Monnier writes: > > (length obarray) > > Doesn't do what you think. An obarray is a vector, and this just > returns the number of buckets in the hash-table. Thanks, my imagination of obarray was indeed wrong. I continued debugging, and found out that when following the recipe in helm I posted, the obarray seems to be filled with more and more symbols - with only a few names. I wrote this test function: --8<---------------cut here---------------start------------->8--- (defun my-find-doubles () (let ((table (make-hash-table :size 65000 :test #'equal))) (mapatoms (lambda (symbol) (if (gethash (symbol-name symbol) table) (message "%S" (symbol-name symbol)) (puthash (symbol-name symbol) t table)))))) --8<---------------cut here---------------end--------------->8--- I would expect that whenever it gets called, it produces no output. Before running the recipe, it indeed prints nothing. But after the first time: "Bahá'í Date" "Insert Bahá'í" "…" These three symbol names all include non-ascii chars, sorry if they should have been posted incorrectly. The effect seems to be exponential or worse, soon I see: "Bahá'í Date" [8191 times] "Insert Bahá'í" [8191 times] "…" [8191 times] after a few more trials. What could be happening here? Thanks, Michael.