Fork me on GitHub
#cursive
<
2022-09-26
>
onetom05:09:10

BTW, I had a quick look at Analyze Plugin Startup Performance and Cursive takes the most time to initialize:

❯ pbpaste|awk '{cnt=$NF; $NF=""; print cnt, $0}'       
1896 Cursive 
1710 Grazie 
677 Database Tools and SQL 
447 JavaScript and TypeScript 
...
I'm wondering, if there would be any low-hanging fruits, which could lower this initialization time. Have you looked into this @cfleming yet?

onetom05:09:43

Here is a full list of my plugin startup times:

❯ pbpaste|awk '{cnt=$NF; $NF=""; print cnt, $0}'       
1896 Cursive 
1710 Grazie 
677 Database Tools and SQL 
447 JavaScript and TypeScript 
238 Shared Indexes 
159 GitHub 
152 Configuration Script 
146 Git 
41 FTP/SFTP/WebDAV Connectivity 
36 Maven 
34 IDE Settings Sync 
25 HTTP Client 
24 Gradle 
22 Machine Learning Code Completion 
19 Vue.js 
19 CSS 
16 Shared Project Indexes 
13 SSH Remote Run 
11 YAML 
10 Diagrams 
9 EditorConfig 
9 Node.js 
8 Properties 
8 JavaScript Debugger 
7 WebP Support 
7 Markdown 
5 Webpack 
4 Shell Script 
3 Node.js Remote Interpreter 
3 JUnit 
3 Completion Stats Collector 
3 Nyan Progress Bar 
2 Package Search 
2 Project Wide Analysis 
1 HTML Tools 
1 Images 
1 Karma 
1 Settings Sync 
1 Java Bytecode Decompiler 
1 Prettier 
1 Live Edit 
1 Polymer & Web Components 
1 Terminal 
0 Machine Learning in Search Everywhere 
0 Next.js Support 
0 Plugin DevKit 
0 Bytecode Viewer 
0 Gradle-Java 
0 Projector Libraries for Code With Me and Remote Development 
0 Maven Extension 
0 com.intellij.dev 
0 IntelliLang 
0 JetBrains maven model api classes 
0 Gradle Extension 
0 com.intellij.tracing.ide 
0 Gradle Dependency Updater Implementation 
0 JavaScript Intention Power Pack 
0 macOS Light Theme 
0 W3C Validators 
0 Gradle DSL API 
0 Vite 
0 Solarized Themes 
0 Remote Development Server 
0 Maven server api classes 
0 WSL File System Support 
0 Project Wide Analysis for Java 
0 Tailwind CSS 
0 ML in Search Everywhere for Microservices 
0 JetBrains Repository Search 
0 Machine Learning Code Completion Models 
(I just copy-pasted from this table from the IntelliJ UI and that little awk script at the beginning moves the last time column to be the 1st, so it's more readable as plain-text.)

onetom05:09:19

im also curious, how would u measure this startup performance. would u use the async-profiler or yourkit? it would be exciting to see a few notes / screenshots about how do u go about investigating something like this, even if u can't improve the performance. just a few sentences would already be inspiring; i wouldn't expect a technology deep-dive.

onetom05:09:28

Here is an example from our project, where I was looking into our usage of the https://github.com/oliyh/martian library. Under the hood we happen to traverse the whole HTTP request payload 4 times with clojure.walk, which can take seconds, when the payload is tens of thousands of Google Sheets spreadsheet cells.

onetom05:09:28

more precisely, 3 times with clojure.walk and 1 time with clojure.data.json

onetom05:09:15

I just checked the plugin startup times in the release version (`2022.2.2`) of intellij and those are much better, so probably it doesn't worth worrying about the startup time:

592 Cursive 
274 AWS Toolkit 
183 Database Tools and SQL 
170 JavaScript and TypeScript 
75 Git 
75 Grazie 
58 Package Search 
56 Python 
40 Shared Indexes 
35 Maven 
24 PlantUML Integration 
18 DOT Language 
18 IDE Settings Sync 
16 CSS 
15 .ignore 
13 FTP/SFTP/WebDAV Connectivity (ex. Remote Hosts Access) 
11 EditorConfig 
9 YAML 
8 Configuration Script 
8 Markdown 
...
here some more exact version numbers:
IntelliJ IDEA 2022.2.2 (Ultimate Edition)
Build #IU-222.4167.29, built on September 13, 2022
Licensed to Tamas Herman
Subscription is active until November 26, 2022.
Runtime version: 17.0.4+7-b469.53 aarch64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
macOS 12.6
GC: G1 Young Generation, G1 Old Generation
Memory: 2000M
Cores: 8
Metal Rendering is ON
Registry:
    documentation.show.toolbar=true

Non-Bundled Plugins:
    some.awesome (1.14)
    ski.chrzanow.foldableprojectview (1.1.3)
    org.plugin.dot.id (1.4.1)
    org.jetbrains.plugins.rest (222.4167.21)
    org.jetbrains.plugins.localization (222.4167.21)
    org.intellij.RegexpTester (1.0.8)
    nix-idea (0.4.0.5)
    name.kropp.intellij.makefile (222.4167.21)
    de.dieploegers.develop.idea.shellfilter (4.3.0)
    com.yanncebron.intellipikchr (0.3.1)
    com.intellij.javafx (1.0.4)
    com.github.b3er.idea.plugins.arc.browser (0.32)
    com.4lex4.intellij.solarized (2.4.0)
    mobi.hsz.idea.gitignore (4.4.2)
    PlantUML integration (5.17.1)
    com.cursiveclojure.cursive (1.12.5-eap2-2022.2)
    com.intellij.plugins.html.instantEditing (222.4167.21)
    com.dmarcotte.handlebars (222.4167.21)
    Pythonid (222.4167.37)
    ru.adelf.idea.dotenv (2022.2)
    aws.toolkit (1.51-222)
    com.github.pshirshov.bytecodeeditor (0.2.1)
    AceJump (3.8.8)
    AWSCloudFormation (222.4167.21)

Kotlin: 222-1.7.10-release-334-IJ4167.29

onetom05:09:46

unless those startup times will be the new norm in intellij 2022.3...

cfleming05:09:17

Cursive takes the most time to initialise, mostly because it uses Clojure - Clojure’s startup time is a well-documented problem. I have a plan to defer actually loading Clojure until something requiring Cursive is performed, so that e.g. opening a non-Clojure project should not cause that to happen. It’s a long-term, ongoing project though.

tlonist08:09:32

how can I apply vertical align for let bindings where there is a destructuring?

(let [{:keys [id]} users ; this line cannot be vertically aligned
       a [1 2 3]
       b {:a :b :c :d}] ...)

onetom08:09:42

indeed the Align let-binding values suggests that the destructuring form would be aligned too, but i can imagine it being an exception from the rule, because such destructuring forms would push other, simpler binding so far to the right, that it would become hard to see which symbol is bound to which value.

tlonist09:09:19

so I'd like to know if there is any forcible way for cursive users to do this. Do you have any idea?

cfleming05:09:58

There isn’t at the moment, no. Destructuring elements are excepted from the rule, because they tend to be very long. But they’re not always, as in your case. This has been discussed before, I’ll see if I can dig up the discussion.

Dustin Getz14:09:28

Is the Cursive extension "clojure-extras" considered standard at this point? I didn't even know about it

imre14:09:27

completely independently developed afaik, see #clj-extras-plugin