Hi,

It seems that is a problem with your VS Code.

Could you check that you have updated the Intersystems ObjectScript extensions?

https://marketplace.visualstudio.com/items?itemName=intersystems-communi...

When you save and compile your code, in the case of a persistent class, it adds the SQLMap, but it is retrieve in this moment.

Check your configuration, I have setted the following one:

Intersystems ObjectScript

✔ Auto Adjust Name

✔ Compile Flags: cuk

 Compile On Save

And this configuration of export in .code-workspace

"objectscript.export": {
	"folder": "src",
	"addCategory": false,
	"map": {},
	"atelier": true,
	"generated": false,
	"filter": "",
	"exactFilter": "",
	"category": "*",
	"noStorage": false,
	"dontExportIfNoChanges": false,
	"maxConcurrentConnections": 0,
	"mapped": true
}

Let me know if it works

Best Regads

It's not a bad idea, but the last value has very little chance of appearing

FOR I=1:1:100 {W $Piece("SAD,MED,TEN,BOB,RAN",",",$r(4)+1),"-" }

TEN-TEN-BOB-TEN-SAD-MED-MED-MED-MED-MED-TEN-MED-BOB-MED-MED-TEN-TEN-MED-SAD-BOB-MED-SAD-BOB-
TEN-TEN-BOB-BOB-SAD-BOB-TEN-MED-BOB-BOB-MED-TEN-MED-SAD-BOB-BOB-BOB-MED-MED-TEN-MED-TEN-MED-
TEN-BOB-MED-TEN-SAD-MED-MED-MED-BOB-SAD-SAD-MED-SAD-BOB-SAD-TEN-BOB-BOB-TEN-BOB-TEN-BOB-SAD-
SAD-TEN-MED-TEN-SAD-BOB-MED-SAD-SAD-BOB-MED-TEN-TEN-SAD-SAD-SAD-BOB-BOB-BOB-TEN-MED-BOB-BOB-
TEN-BOB-SAD-SAD-BOB-BOB-BOB-MED

SAD    20%
MED    27%
TEN    23%
BOB    30%
RAN    0%

I've tried to user other way, for example, using a GUID, get the checksum and get the module 5

Something like $Piece("SAD,MED,TEN,BOB,RAN",",",($ZCRC(##class(%SYSTEM.Util).CreateGUID(),0)#5) + 1)

for i=1:1:100 {W $Piece("SAD,MED,TEN,BOB,RAN",",",($ZCRC(##class(%SYSTEM.Util).CreateGUID(),0)#5) + 1),"-"}

TEN-SAD-BOB-MED-BOB-BOB-MED-MED-BOB-RAN-MED-BOB-RAN-MED-RAN-BOB-BOB-MED-RAN-SAD-RAN-MED-MED-
BOB-TEN-BOB-RAN-MED-TEN-TEN-TEN-SAD-BOB-MED-BOB-BOB-BOB-RAN-RAN-TEN-MED-RAN-RAN-BOB-RAN-TEN-
MED-TEN-TEN-MED-RAN-BOB-TEN-SAD-SAD-TEN-TEN-TEN-BOB-RAN-MED-SAD-MED-SAD-RAN-RAN-RAN-BOB-MED-
SAD-MED-RAN-RAN-SAD-RAN-RAN-BOB-MED-TEN-TEN-RAN-BOB-TEN-TEN-RAN-BOB-BOB-TEN-MED-SAD-SAD-BOB-
BOB-BOB-SAD-TEN-MED-TEN-BOB-SAD

SAD    13%
MED    20%
TEN    20%
BOB    25%
RAN    22%

I have best percentage to get a different value.

Thanks for you answer.

We have solved the problem of the delay in BP, and now, the number of new instances of BS has been drastically reduced.

We are talking with the customer to upgrade the actor pool number to create a 3 new instances of the BP. The customer is worried that this increase in instances could affect memory performance, because more instances created, more memory it requires.