[squeak-dev] source.squeak.org --- Responsiveness
David T. Lewis
lewis at mail.msen.com
Wed Jan 24 02:37:16 UTC 2018
On Tue, Jan 23, 2018 at 05:36:00PM -0800, Eliot Miranda wrote:
> Hi David,
>
> On Tue, Jan 23, 2018 at 5:08 PM, David T. Lewis <lewis at mail.msen.com> wrote:
> >
> > On Tue, Jan 23, 2018 at 01:26:37PM -0800, Eliot Miranda wrote:
> >
> > If in fact the diff processing for mailing list updates is the culprit, and
> > if this is something that could be relegated to a background process
> > completely
> > separate from the user interactions, then I would be tempted to try putting
> > the mailing list processing into a #forkHeadlessSqueakAndDoThenQuit:
> > block.
> > Any interest?
> >
>
> It's certainly worth looking at. And that suggests that there could be two
> separate images running concurrently, one doing the serving, and one doing
> the diffs, possibly prompted by the server image.
>
At the risk of embarassing myself by posting untested code that probably will
not work, the attached change set shows what I had in mind.
Dave
-------------- next part --------------
'From Squeak6.0alpha of 22 January 2018 [latest update: #17301] on 23 January 2018 at 9:23:46 pm'!
"Change Set: MC notification diff in background for SqueakSource
Date: 23 January 2018
Author: David T Lewis
For MCRepository updates, if OSProcess is available, use it to process diffs and email notifications in a background Squeak OS process."!
!MCRepository methodsFor: 'accessing' stamp: 'dtl 1/23/2018 21:17'!
sendNotificationsForVersion: aVersion
"Calculate diffs and send notification emails. If UnixProcess is available, do the
processing in a child OS process to prevent delays in this image."
| sendNotificationsBlock |
sendNotificationsBlock := [self sendNotificationsForVersion: aVersion to: self notifyList].
(Smalltalk classNamed: #UnixProcess)
ifNil: [sendNotificationsBlock value]
ifNotNil: [ :unixProcess | unixProcess
perform: #forkHeadlessSqueakAndDoThenQuit:
with: sendNotificationsBlock]
! !
!MCRepository methodsFor: 'accessing' stamp: 'dtl 1/23/2018 21:06'!
sendNotificationsForVersion: aVersion to: notifyList
| notification |
notifyList isEmpty ifFalse:
[notification := self notificationForVersion: aVersion.
notifyList do: [:ea | notification notify: ea]]! !
More information about the Squeak-dev
mailing list
|