script-users slow down riverdashboard

Hi everyone

i've noticed some weird thing:

my ordinary users are script-generated with the following code:

$guid = register_user($name, $password, $name, $email, TRUE);

        if ($guid) {

            // add user id to list

            $guids[] = $guid;

            $new_user = get_entity($guid);

            $new_user->admin_created = TRUE;

            $new_user->created_by_guid = 3; 

            set_user_validation_status($new_user->getGUID(), TRUE, 'admin_created');

            echo "user \"$guid\" created successfully.<br>";

        } else {

            echo "error: user could not be created!";

        }

For all these users it takes extremly long to post something to the riverdashboard (modified with the wire). Up to 10 seconds or more.

For my admins and the users created through administration/User Administration don't have that problem. Their messages are added to the river right away.

Does anybody have a solution for that problem? Do you need more code?