Memory storage on Gitlab repository - Pavlovia

I managed to “turn off” the log files by commenting out certain lines of code in the core lib-file.
I’m not sure whether that alteration of the code leads to any side effects. In my task, I didn’t notice any.

When I ran the online experiment with the altered file, no log file was generated/saved and according to the DOM-inspector of my browser there seemed to be less storage spent on strings (I’m no expert but to me it seemed reasonable to be related to the alterations).

It did not resolve all of my issues, but depending on what you’re trying to achieve it might work for you.

I used an altered version of the script provided by @benwang (see topic below) to update the relevant files after every sync with pavlovia.

In the altered version of the core-file (core-2020.2.js) I commented out line 527, 531, 539 - 544 (class Logger code chunk)

    exp(msg, time, obj)
	{
		//this.log(msg, Logger.ServerLevel.EXP, time, obj);
	}
	data(msg, time, obj)
	{
		//this.log(msg, Logger.ServerLevel.DATA, time, obj);
	}
	log(msg, level, time, obj)
	{
		if (typeof time === 'undefined')
		{
			time = MonotonicClock.getReferenceTime();
		}
		/*this._serverLogs.push({
			msg,
			level,
			time,
			obj: toString(obj)
		}); */
	 }

and line 806 (class Window extends PsychObject code chunk).

logOnFlip({
							msg,
							level = Logger.ServerLevel.EXP,
							obj
						} = {})
	{
		//this._msgToBeLogged.push({msg, level, obj});
	}

You can find the original lib file version corresponding to your prefered PsychoPy release by changing this link: https://lib.pavlovia.org/core-2020.2.js

2 Likes