<commit_before>/* global gl, Flash */
/* eslint-disable no-param-reassign */

((gl) => {
  class PipelineUpdater {
    constructor(pipelines) {
      this.pipelines = pipelines;
      this.updateClone = (update, newPipe) => {
        update.forEach((pipe) => {
          if (pipe.id === newPipe.id) pipe = Object.assign({}, pipe, newPipe);
        });
      };
    }

    currentPageSlicer(update) {
      const length = update.length;
      if (this.pipelines.length === update.length) return update;
      if (update.length <= 30) return update;
      return update.slice(0, (length - 1));
    }
<commit_msg>much more performant pageSlicer - [ci skip]<commit_after>/* global gl, Flash */
/* eslint-disable no-param-reassign */

((gl) => {
  class PipelineUpdater {
    constructor(pipelines) {
      this.pipelines = pipelines;
      this.updateClone = (update, newPipe) => {
        update.forEach((pipe) => {
          if (pipe.id === newPipe.id) pipe = Object.assign({}, pipe, newPipe);
        });
      };
    }

    currentPageSlicer(update) {
      if (update.length <= 30) return update;
      return update.slice(0, 29);
    }

{'fraction_non_alphanumeric': 0.15641476274165203, 'fraction_numerical': 0.007908611599297012, 'mean_word_length': 2.5046153846153847, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '527175', 'n_tokens_mistral': 379, 'n_tokens_neox': 365, 'n_words': 78}