From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.devel Subject: Re: cc-mode fontification feels random Date: Fri, 4 Jun 2021 15:44:48 +0300 Message-ID: <212d7915-23bb-0ede-f672-7abb3ac5fc53@yandex.ru> References: <831r9iw473.fsf@gnu.org> <87h7ieyma7.fsf@gmail.com> <83wnr9vrpj.fsf@gnu.org> <83o8clvpq4.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35926"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 Cc: p.stephani2@gmail.com, dancol@dancol.org, theo@thornhill.no, ubolonton@gmail.com, emacs-devel@gnu.org To: Eli Zaretskii , =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Jun 04 14:45:58 2021 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lp9D3-0009AA-Dw for ged-emacs-devel@m.gmane-mx.org; Fri, 04 Jun 2021 14:45:57 +0200 Original-Received: from localhost ([::1]:58834 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lp9D1-0004re-HZ for ged-emacs-devel@m.gmane-mx.org; Fri, 04 Jun 2021 08:45:55 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:52492) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lp9C3-00046e-Ro for emacs-devel@gnu.org; Fri, 04 Jun 2021 08:44:55 -0400 Original-Received: from mail-wr1-x42a.google.com ([2a00:1450:4864:20::42a]:33644) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lp9C0-0007EX-N6; Fri, 04 Jun 2021 08:44:55 -0400 Original-Received: by mail-wr1-x42a.google.com with SMTP id a20so9242347wrc.0; Fri, 04 Jun 2021 05:44:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=6zJJuTRZ5h46VvBTlhz+RVaAbvv+ZRI3/CtaI+8sqks=; b=qrNmEnzGNBqfj4t/59wHxa5ZkPdzRRWIM/33rsLm0Xf0hd6abRruPO6lShOHQmJCaJ O5RbGr71p2ICpHZDaFs7FQ/6lO1g6UnTHoPxoJsqDqLwJL7RbrsInP1HR/Oq1gYRVLme QgpDepEfdvG3L+yImfH1AjFivlQ0I6oPdwESqxxRXlJ0e3wON9P3EOBpLN9gmcHYKxHD Lr/yJf6YPT1fxvXjij5MKx5CPaJsJdTbDeyQH1bmNB7p0jo5MMqGHZerPBjAkzUNcIBT E+CzJ4mJtukQI7tJ4uffR50w54ypVSp49cdi2EaQueYEwmZ9GnDbhxaUaQMoDrKwbfXl JHIw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=6zJJuTRZ5h46VvBTlhz+RVaAbvv+ZRI3/CtaI+8sqks=; b=IMntu+kpJZRDQiDZS++aGXqsNNcmCIHn4X8HXrb0iCoKg5slOE1o3CT6bvTFi/+1we 5jY+iDpgtjn/PF5Utf8mdn1b0AtLzY1X7PTnDXs0qHbhIUICbRMOrxP74Z5yXlewH+na Zc/tqB/BRUyLo+2gskp58w5wMS0duvUjD/sRUJDlXl4vE467RKpnLj+Bm9LOlngkSIz3 eKG7x1AhW2rXSIEB/3TDS6SB16vNKwNSBKdV/Vo08167PSgX1/54vm5UC/HtW+N9A4C+ 5rl+HK/qE9KOG5Jl6NWEJMQJ8L14gT1iLEpSIvbSjE4pq1CCsV/R6sOpULRtfGg8jzFn rxxg== X-Gm-Message-State: AOAM532ZMgg56zxLh/Kro6Dcdydc0d9qwkWuYP4/ecsfOqkiYWzzWbSb yV2I12YLTvqje/9ain8YWAlPU7eu2x4= X-Google-Smtp-Source: ABdhPJwOJAfSeigmMIfTQZSD2N8ZiEXofLFfIBky8Ydc/I0j+xv2pOEt3dgHEqMuvY2XrXaXnWBc4Q== X-Received: by 2002:adf:bc07:: with SMTP id s7mr3778464wrg.301.1622810690705; Fri, 04 Jun 2021 05:44:50 -0700 (PDT) Original-Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id p16sm6741733wrs.52.2021.06.04.05.44.49 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 04 Jun 2021 05:44:50 -0700 (PDT) In-Reply-To: <83o8clvpq4.fsf@gnu.org> Content-Language: en-US Received-SPF: pass client-ip=2a00:1450:4864:20::42a; envelope-from=raaahh@gmail.com; helo=mail-wr1-x42a.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, NICE_REPLY_A=-0.59, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:270384 Archived-At: On 04.06.2021 14:22, Eli Zaretskii wrote: > Ask Dmitry about performance problems with native JSON support, and > the effort we invested (a year ago?) into optimizing UTF-8 encoding of > strings, to squeeze every last percent of performance. About a year ago, yes (bug#31138 plus some follow-ups). With string encoding taken care of, IIUC the current bottleneck is in parsing: Lisp object allocation which still has to happen on the current thread (some way to use parallel heaps could help with that). And to get all of the highlightings for the current buffer, we will need to parse the response JSON document, probably also fairly large.