Skip to content

Add stpulse#1164

Merged
estebanlm merged 7 commits intoPharo14from
add-stpulse
Jun 26, 2025
Merged

Add stpulse#1164
estebanlm merged 7 commits intoPharo14from
add-stpulse

Conversation

@SebastianLorenzano
Copy link
Member

@SebastianLorenzano SebastianLorenzano commented Jun 12, 2025

Pulse is a remake of Spotter, a front-end to show the result of different processors that provide results. Those processors can be configured in different ways and will provide different access options.

The idea is to divide the old Spotter in 3 tabs:
• Environment for classes, methods, packages
• Windows for every open window in the image
• Tools for menu items

Right now Pulse pulls the first 25 results it gets, getting the first 3 via events so the user doesn't have to wait for the full search to be over to find the first results, which speeds the user experience.
Any time you open either a class, a method or a package (anything that is in the environment tab) it is stored as a HistoryEntry version of itself, which stores either its contents serialized to a string or in the case of the package it stores the package name and when its pulled it makes the search. This was done to evade hard references, and every HistoryEntry are stored in a memory circular logger that cleans itself from any nil entry or any entry with a nil content.
The UI works with a single lists whose context is defined by the page of the paginator that is opened at the moment: When you either change tabs or write, it sends a search (there is a service running every 50 milliseconds which is the one in charge of behaving differently depending on what part of the search is or even if it is or not searching at the moment, StPulse >> processSearch has all the logic and is the method called by the service's step) and there is an outside of service search done when changing tabs.

@jecisc
Copy link
Member

jecisc commented Jun 12, 2025

Hi,

To help with the review it would be nice to add a description of what this PR does :)
I have no idea of what is StPulse

@@ -0,0 +1,88 @@
"
I wrap a Class or Trait entry, and store its content printString, then later using OpalCompiler to compile it into an object when needed.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do not really get this comment.
Why do we need to compile it later?
Why Spotter would need that?

Copy link
Member Author

@SebastianLorenzano SebastianLorenzano Jun 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is stored as a string and not as a reference of the object to evade making a hard reference of it. Storing a hard reference would make it so the number of references of the entry never reach 0 and it never goes through garbage collection

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

basically, it avoids a leak in case of class/method removal :)

@SebastianLorenzano
Copy link
Member Author

@jecisc You are right, fixed :)

@estebanlm
Copy link
Member

@jecisc You are right, fixed :)

but what is StPulse was told

@estebanlm estebanlm closed this Jun 25, 2025
@estebanlm estebanlm reopened this Jun 25, 2025
@estebanlm
Copy link
Member

@SebastianLorenzano errors are relevant to your issue ;)

@estebanlm
Copy link
Member

errors not related, ready to merge

@estebanlm estebanlm merged commit 5f981fd into Pharo14 Jun 26, 2025
0 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants