Matthew-DWM opened a new issue, #9631:
URL: https://github.com/apache/texera/issues/9631

   ### Task Summary
   
   To wire each logical link, `WorkflowCompiler.expandLogicalPlan` finds the 
upstream physical operator with 
`physicalPlan.getPhysicalOpsOfLogicalOp(link.fromOpId).find(_.outputPorts.contains(link.fromPortId))`
 
([WorkflowCompiler.scala#L290-L295](https://github.com/apache/texera/blob/95e2748b97e0cdd29069971fe74349ac5f28134b/common/workflow-compiler/src/main/scala/org/apache/texera/common/compiler/WorkflowCompiler.scala#L290-L295)).
 
[`getPhysicalOpsOfLogicalOp`](https://github.com/apache/texera/blob/95e2748b97e0cdd29069971fe74349ac5f28134b/common/workflow-core/src/main/scala/org/apache/texera/amber/core/workflow/PhysicalPlan.scala#L66-L71)
 builds a JGraphT DAG of the plan built so far and walks it in topological 
order. The plan is a new copy after every insertion, so each link rebuilds that 
DAG from scratch, and compile time grows with the square of the number of 
operators. The compiler runs on every edit in the workflow editor and again 
before each run.
   
   On a warmed-up JVM (JDK 17), compiling a chain of 64 operators takes 10.8 
ms, about 7 ms of which goes to these lookups. A workflow of 36 Aggregates 
spends about 5 ms of 9.8 ms in them.
   
   Record the physical operator that produces each output port of each logical 
operator as operators are added, and wire links from that record. The compiled 
plan should not change.
   
   ### Task Type
   
   - [ ] Refactor / Cleanup
   - [ ] DevOps / Deployment / CI
   - [ ] Testing / QA
   - [ ] Documentation
   - [x] Performance
   - [ ] Other


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

  • [I] Workflow compiler walks the... Matthew-DWM (via GitHub) via notifications

Reply via email to