Coder Social home page Coder Social logo

Comments (10)

aMarCruz avatar aMarCruz commented on June 14, 2024 2

@bwindels thanks, I will check it asap.

from rollup-plugin-cleanup.

xania avatar xania commented on June 14, 2024 1

Same issue here!
I was able to narrow it down to this line in skip-regex.js. For context the stacktrace is included.

image

R_JS_REGEX:
"^/(?=[^*\/])[^[/\](?:(?:\.|[(?:\.|[^\]\\])])[^[\/])?/[gimuys]"
match[0]
"/element.height;var pathData=pathMap.getScaledPath('DATA_OBJECT_COLLECTION_PATH',{xScaleFactor:1,yScaleFactor:1,containerWidth:element.width,containerHeight:element.height,position:{mx:0.451,my:yPosition}});drawPath(parentGfx,pathData,{strokeWidth:2});}this._drawPath=drawPath;}inherits(BpmnRenderer,BaseRenderer);BpmnRenderer.$inject=['config.bpmnRenderer','eventBus','styles','pathMap','canvas','textRenderer'];BpmnRenderer.prototype.canRender=function(element){return is(element,'bpmn:BaseElement');};BpmnRenderer.prototype.drawShape=function(parentGfx,element){var type=element.type;var h=this.handlers[type];return h(parentGfx,element);};BpmnRenderer.prototype.drawConnection=function(parentGfx,element){var type=element.type;var h=this.handlers[type];return h(parentGfx,element);};BpmnRenderer.prototype.getShapePath=function(element){if(is(element,'bpmn:Event')){return getCirclePath(element);}if(is(element,'bpmn:Activity')){return getRoundRectPath(element,TASK_BORDER_RADIUS);}if(is(element,'bpmn:Gateway')){return getDiamondPath(element);}return getRectPath(element);};"

from rollup-plugin-cleanup.

aMarCruz avatar aMarCruz commented on June 14, 2024

@Aqours I will check it asap. Thanks.

from rollup-plugin-cleanup.

gevalo1 avatar gevalo1 commented on June 14, 2024

@aMarCruz were you able to look into this? I bumped into this issue today as well.

from rollup-plugin-cleanup.

aMarCruz avatar aMarCruz commented on June 14, 2024

I'll look at this issue until this week-end.

from rollup-plugin-cleanup.

bwindels avatar bwindels commented on June 14, 2024

I think I am encountering the same issue, rollup hangs forever with this plugin enabled on this particular statement. Removing the statement, or this plugin from my rollup config makes rollup not hang anymore. Let me know if I can provide any further details.

I tried reproducing the problem by passing the same code through js-cleanup but wasn't able to reproduce that way.

from rollup-plugin-cleanup.

aMarCruz avatar aMarCruz commented on June 14, 2024

@Aqours, @gevalo1, @xania, @bwindels , please try cleanup v3.2.1, it is already in npm.

from rollup-plugin-cleanup.

bwindels avatar bwindels commented on June 14, 2024

@Aqours, @gevalo1, @xania, @bwindels , please try cleanup v3.2.1, it is already in npm.

Still hangs for me with cat node_modules/rollup-plugin-cleanup/package.json | jq ".version":
"3.2.1"

from rollup-plugin-cleanup.

ssivov avatar ssivov commented on June 14, 2024

Same issue here!
I was able to narrow it down to this line in skip-regex.js. For context the stacktrace is included.

image

R_JS_REGEX:
"^/(?=[^_/])[^[/](?:(?:.|[(?:.|[^]])])[^[/])_?/[gimuys]*"
match[0]
"/element.height;var pathData=pathMap.getScaledPath('DATA_OBJECT_COLLECTION_PATH',{xScaleFactor:1,yScaleFactor:1,containerWidth:element.width,containerHeight:element.height,position:{mx:0.451,my:yPosition}});drawPath(parentGfx,pathData,{strokeWidth:2});}this._drawPath=drawPath;}inherits(BpmnRenderer,BaseRenderer);BpmnRenderer.$inject=['config.bpmnRenderer','eventBus','styles','pathMap','canvas','textRenderer'];BpmnRenderer.prototype.canRender=function(element){return is(element,'bpmn:BaseElement');};BpmnRenderer.prototype.drawShape=function(parentGfx,element){var type=element.type;var h=this.handlers[type];return h(parentGfx,element);};BpmnRenderer.prototype.drawConnection=function(parentGfx,element){var type=element.type;var h=this.handlers[type];return h(parentGfx,element);};BpmnRenderer.prototype.getShapePath=function(element){if(is(element,'bpmn:Event')){return getCirclePath(element);}if(is(element,'bpmn:Activity')){return getRoundRectPath(element,TASK_BORDER_RADIUS);}if(is(element,'bpmn:Gateway')){return getDiamondPath(element);}return getRectPath(element);};"

Confirmed, i'm running into the same issue! This might be a problem for a lot of people because this fails to cleanup Google Web Vitals distribution (node_modules/web-vitals/dist/web-vitals.es5.min.js)

Regex used by skip-regex

/^\/(?=[^*/])[^[/\\]*(?:(?:\\.|\[(?:\\.|[^\]\\]*)*\])[^[\\/]*)*?\/[gimuys]*/

String that kills it

/0,c((function(n){var e=n.timeStamp;return t=e}),!0)),{get timeStamp(){return t}}},v=function(t){var n,e=i("FCP"),r=d(),o=a("paint",(function(t){"first-contentful-paint"===t.name&&t.startTime<r.timeStamp&&(e.value=t.startTime,e.isFinal=!0,e.entries.push(t),n())}));o&&(n=l(t,e,o))},f=function(t){var n=i("FID"),e=d(),r=function(t){t.startTime<e.timeStamp&&(n.value=t.processingStart-t.startTime,n.entries.push(t),n.isFinal=!0,s())},o=a("first-input",r),s=l(t,n,o);o?c((function(){o.takeRecords().map(r),o.disconnect()}),!0):window.perfMetrics&&window.perfMetrics.onFirstInputDelay&&window.perfMetrics.onFirstInputDelay((function(t,i){i.timeStamp<e.timeStamp&&(n.value=t,n.isFinal=!0,n.entries=[{entryType:"first-input",name:i.type,target:i.target,cancelable:i.cancelable,startTime:i.timeStamp,processingStart:i.timeStamp+t}],s())}))},m=function(){return n||(n=new Promise((function(t){return["scroll","keydown","pointerdown"].map((function(n){addEventListener(n,t,{once:!0,passive:!0,capture:!0})}))}))),n},g=function(t){var n,e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=i("LCP"),o=d(),s=function(t){var e=t.startTime;e<o.timeStamp?(r.value=e,r.entries.push(t)):r.isFinal=!0,n()},u=a("largest-contentful-paint",s);if(u){n=l(t,r,u,e);var p=function(){r.isFinal||(u.takeRecords().map(s),r.isFinal=!0,n())};m().then(p),c(p,!0)}},h=function(t){var n,e=i("TTFB");n=function(){try{var n=performance.getEntriesByType("navigation")[0]||function(){var t=performance.timing,n={entryType:"navigation",startTime:0};for(var e in t)"navigationStart"!==e&&"toJSON"!==e&&(n[e]=Math.max(t[e]-t.navigationStart,0));return n}();e.value=e.delta=n.responseStart,e.entries=[n],e.isFinal=!0,t(e)}catch(t){}},"complete"===document.readyState?setTimeout(n,0):addEventListener("pageshow",n)};export{p as getCLS,v as getFCP,f as getFID,g as getLCP,h as getTTFB};

@aMarCruz I tried using a different regex found on stackoverflow - it solves the performance problem and works fine for my code, however it fails 6 of your test cases. Do you think this performance issue could be resolved any time soon?

from rollup-plugin-cleanup.

smashah avatar smashah commented on June 14, 2024

I can also confirm that the issue is with using this with web-vitals package

from rollup-plugin-cleanup.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.