sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: godot
Issue: Occlusion culling causes CPU-related frametime spikes when OccluderInstance3D nodes' visibility is toggled
Labels: discussion,topic:rendering,topic:3d,performance

*Related to https://github.com/godotengine/godot-proposals/issues/5967.*

### Godot version

4.0.beta9

### System information

Fedora 36, Vulkan Forward Plus, AMD Radeon RX 6900 XT

### Issue description

Occlusion culling causes CPU frametime spikes when OccluderInstance3D nodes with BoxOccluder shapes are hidden and shown. This occurs both with V-Sync enabled and disabled, and is noticeable in both cases. A fully optimized engine binary (with LTO enabled) was used to reproduce this issue. I also tried setting the **BVH Build Quality** advanced project setting to **Low**, to no avail.

The MRP toggles visibility of static OccluderInstance3D to disable them when 4 doors start opening, and re-enables them when the doors are done closing. This is done to avoid moving OccluderInstance3D nodes every frame, which would trigger unnecessary BVH rebuilds (on top of overocclusion).

All doors open/close at the same time in the MRP, which makes the issue more noticeable. However, it still occurs with a single door present in the scene (with the other 3 doors removed entirely, not just hidden). As a workaround, making sure multiple occluders are never toggled on the same frame can help.

According to the visual profiler, **Cull Scene** (highlighted in white) is the most expensive operation during those spikes, not **Update Occlusion Buffer**:

![2022-12-20_22 52 01](https://user-images.githubusercontent.com/180032/208774485-9118dbdf-2b30-4c10-8ad5-3c5a0c71665e.png)


### Steps to reproduce

- Create or download a 3D scene with geometry. You can use https://github.com/Calinou/game-maps-obj as a reference.
- Enable occlusion culling in the project settings.
- Add an OccluderInstance3D node and bake it to match the level geometry.
- Add a second OccluderInstance3D node with a BoxOccluder shape.
- Toggle the OccluderInstance3d nodes' visibility.
- Notice frametime spikes using editor profiles, [MangoHud](https://github.com/flightlessmango/MangoHud), RTSS or similar.

### Minimal reproduction project

[occlusion_culling_mesh_lod.zip](https://github.com/godotengine/godot/files/10272954/occlusion_culling_mesh_lod.zip) (same as https://github.com/godotengine/godot-demo-projects/pull/807)
Repository: godot
Issue: Occlusion culling buffer is still updated when moving hidden OccluderInstance3Ds
Labels: enhancement,topic:rendering,topic:3d,performance

*Related to https://github.com/godotengine/godot/issues/70373.*

### Godot version

4.0.beta9

### System information

Fedora 36, Vulkan Forward Plus, AMD Radeon RX 6900 XT

### Issue description

The occlusion culling buffer is still updated when moving hidden OccluderInstance3Ds. This could be avoided at least when the node itself is hidden, but also when one of its parents is hidden. This way, you wouldn't have to worry about moving nodes with OccluderInstance3D children while they're hidden (to avoid unnecessary BVH rebuilds, which take a significant amount of CPU time).

Using this approach of rotating the occluder without hiding it also doesn't resolve frametime spikes. They are certainly reduced, but still noticeable enough that it prevents getting perfectly smooth frametimes with V-Sync enabled. Overocclusion also occurs when doors open, due to the BVH taking a few frames to be fully updated.

### Steps to reproduce


- Create or download a 3D scene with geometry. You can use https://github.com/Calinou/game-maps-obj as a reference.
- Enable occlusion culling in the project settings.
- Add an OccluderInstance3D node and bake it to match the level geometry.
- Add a second OccluderInstance3D node with a BoxOccluder shape.
- Move the OccluderInstance3D node every frame with an AnimationPlayer or script.
- Disable V-Sync to ensure you can reach the highest possible framerate on your hardware.
- Measure framerate using the editor profiler, [MangoHud](https://github.com/flightlessmango/MangoHud), RTSS or similar.
- Hide the OccluderInstance3D node. Notice how framerate fluctuations due to occlusion culling still occur.

### Minimal reproduction project

[occlusion_culling_mesh_lod_hidden_occluder_rotating.zip](https://github.com/godotengine/godot/files/10273003/occlusion_culling_mesh_lod_hidden_occluder_rotating.zip)

Tap the <kbd>F</kbd> key to make the doors close and reopen continuously while V-Sync is disabled. Notice how framerate dips with occlusion culling enabled compared to occlusion culling disabled, **even though the door's OccluderInstance3D node is hidden in this situation** (you can check the remote scene tree to confirm this).
Repository: pytorch
Issue: Odd/hand-wavy mathematical notation for Conv2D
Labels: module: docs,triaged

### 📚 The doc issue

Beginning with https://github.com/pytorch/pytorch/blob/cdbca3563e12097a8bf359e937d6d6196fa6dc89/torch/nn/modules/conv.py#L188
there is a description of the convolution result per out-channel  $C_{out_j}$ and batch sample $N_i$. While this is used to indicate that $i$ and $j$ iterate over $N$ and $C_{out}$, respectively, it is unusual/misleading notation (correct me if I am wrong). Despite a strong mathematical background it has confused me and my peers. E.g., using $N$ and $N_i$ in the same context usually means that $N_i$ is something like $N$ (i.e. a cardinality), but we generalize for different instances indexed by $i$, where $N$ would otherwise occur as a constant. This is not the case here.

### Suggest a potential alternative/fix

Use the more common and less confusing notation $(i\leq N,\ j\leq C_{out})$ or $(i\in [N],\ j \in [C_{out}])$:

```
\text{out}(i,j) = \text{bias}(j) +
        \sum_{k = 0}^{C_{in} - 1} \text{weight}(j, k)
        \star \text{input}(i, k) \quad i \leq N,\ j \leq C_{out}

cc @svekars @carljparker
Repository: storybook
Issue: [Feature Request]: Demo stories for web components shouldn't include non-standard imports
Labels: feature request,needs triage

### Is your feature request related to a problem? Please describe

The stories generated for web components projects with `sb init` contain non-standard CSS imports which only work with bundlers. This style of CSS import is likely foreign to many web components developers who use stacks that don't include bundler plugins.

### Describe the solution you'd like

CSS should be included in a standard-compatible way:
- Inline CSS strings
- Standard CSS module script imports: `import styles from './styles.css' assert {type: 'css'};`
- Included in HTML with `<style>` or `<link>` tags.

### Describe alternatives you've considered

_No response_

### Are you able to assist to bring the feature to reality?

no

### Additional context

_No response_
Repository: next.js
Issue: SWC `compiler: { emotion: true }` does not support `@emotion/css` SSR
Labels: bug

### Verify canary release

- [X] I verified that the issue exists in the latest Next.js canary release

### Provide environment information

```
    Operating System:
      Platform: darwin
      Arch: x64
      Version: Darwin Kernel Version 22.1.0: Sun Oct  9 20:14:54 PDT 2022; root:xnu-8792.41.9~2/RELEASE_X86_64
    Binaries:
      Node: 16.15.0
      npm: 8.5.5
      Yarn: 1.22.19
      pnpm: 7.13.5
    Relevant packages:
      next: 13.0.8-canary.2
      eslint-config-next: N/A
      react: 18.2.0
      react-dom: 18.2.0
```

### Which area(s) of Next.js are affected? (leave empty if unsure)

_No response_

### Link to the code that reproduces this issue

https://codesandbox.io/s/clever-khorana-t6nzq8?file=/pages/index.tsx

### To Reproduce

To reproduce, use the `@emotion/css` package, then load the page without Javascript enabled to see no CSS included in the server side build.

### Describe the Bug

Unlike `@emotion/react` and `@emotion/styled`, `@emotion/css` SSR rendering is not supported for server-side rendering with the SWC `compiler: { emotion: true },` flag in `next.config.js`

### Expected Behavior

I expect `@emotion/css` to support SSR like other emotion packages.

### Which browser are you using? (if relevant)

_No response_

### How are you deploying your application? (if relevant)

_No response_
Repository: next.js
Issue: Standalone server does not proxy WebSocket connections
Labels: bug

### Verify canary release

- [X] I verified that the issue exists in the latest Next.js canary release

### Provide environment information

    Operating System:
      Platform: darwin
      Arch: arm64
      Version: Darwin Kernel Version 22.1.0: Sun Oct  9 20:14:30 PDT 2022; root:xnu-8792.41.9~2/RELEASE_ARM64_T8103
    Binaries:
      Node: 16.16.0
      npm: 8.11.0
      Yarn: 1.22.15
      pnpm: 6.11.0
    Relevant packages:
      next: 13.0.8-canary.2
      eslint-config-next: 13.0.0
      react: 18.2.0
      react-dom: 18.2.0

### Which area(s) of Next.js are affected? (leave empty if unsure)

Standalone mode (output: "standalone")

### Link to the code that reproduces this issue

https://github.com/georgeclaghorn/next-standalone-ws-rewrites

### To Reproduce

1. Clone the sample repo and `cd` into it.

2. Install dependencies: `npm install`.

3. Build and run the app: `npm run build && npm run start`.

4. Open http://localhost:3000 in any browser. See that the WebSocket connection is successfully established.

5. Build and run the standalone server:
   
   ```
   npm run build
   cp -R public .next/standalone
   cp -R .next/static .next/standalone/.next
   node .next/standalone/server.js
   ```

6. Refresh http://localhost:3000 in your browser. See that the WebSocket connection is stuck in the connecting state.

### Describe the Bug

#39463 added support for proxying WebSocket connections through rewrites, and it does work via `next dev` and `next start`. The standalone server does not proxy WebSocket connections, though. They get stuck in the connecting state.

### Expected Behavior

The standalone server proxies WebSocket connections through rewrites, just like `next start`. WebSocket connections can be successfully established to servers behind rewrites.

### Which browser are you using? (if relevant)

N/A

### How are you deploying your application? (if relevant)

N/A
Repository: storybook
Issue: [Feature Request]: Truly portable stories: decouple @storybook/web-components and Lit, make storyResult return void 
Labels: feature request,needs triage

### Is your feature request related to a problem? Please describe

`@storybook/web-components` expects that stories can return Lit-specific return types like TemplateResult. This coupling is unfortunate because not every web component developer uses Lit. It also means that CSF renders need to have Lit support built-in. It would be great if instead CSF modules were completely self-contained by bringing their own renderer.

### Describe the solution you'd like

It seems like we could have much more portable stories that don't require detecting the return type of story render functions and don't even require Storybook or alternate story renders to have any dependencies on the framework used to render stories by making the storyResult type be `void`.

This way stories would be entirely self-contained, and instead of returning a lit-html template from `render()`, `render()` would just be responsible for rendering to the canvas element.

So the metadata export would go from:
```ts
import {html} from 'lit';

const meta: Meta<MyElement> = {
  title: 'Example/MyElement',
  tags: ['docsPage'],
  render: ({count}) => html`<my-element .count=${count}></my-element>`;
};
export default meta;
```

to:
```ts
import {html, render} from 'lit';

const meta: Meta<MyElement> = {
  title: 'Example/MyElement',
  tags: ['docsPage'],
  render: ({count}, {canvasElement}) => {
    render(html`<my-element .count=${count}></my-element>`, canvasElement);
  },
};
export default meta;
```

Then to render a story module, one only needs to fetch it and call the render function:

```ts
const mod = await import(storyUrl);
const render = mod.default.render;

for (const [name, story] of Object.entries(mod)) {
  const canvasElement = document.createElement('div');
  document.body.append(canvasElement);
  render(story.args, {canvasElement})  
}
```

This solution should actually work with any framework so that even Storybook wouldn't need any specific framework support built-in.

### Describe alternatives you've considered

_No response_

### Are you able to assist to bring the feature to reality?

yes, I can

### Additional context

I am working on a web components catalog and am considering using CSF as the story format, but don't want to build Lit support directly into the catalog. If we use CSF, we might say that we only support CSF modules that are self-contained in this way.
Repository: flutter
Issue: [image_picker] Support maxRecordedFileSize on pickVideo method
Labels: c: new feature,p: image_picker,package,c: proposal,team-ecosystem,P3,triaged-ecosystem

First of all, thank you so much for creating the best package!!
My suggestion is to add a property like swift's maxRecordedFileSize to the image picker. pickImage method has a method to adjust the file size but pickVideo does not.
Repository: flutter
Issue: [Camera WEB] Camera can not be "fullscreen" on mobile
Labels: platform-web,p: camera,package,a: layout,has reproducible steps,P2,browser: chrome-android,found in release: 3.3,has partial patch,found in release: 3.7,team-web,triaged-web

I built a camera web app and had an error: The camera can not take full size (Chrome on both iOS and Android)

Here's the flutter doctor:
```
tungakanui@Tnuis-MacBook-Pro claime_web % fvm flutter doctor --verbose
[✓] Flutter (Channel stable, 3.3.9, on macOS 13.0.1 22A400 darwin-arm, locale en-VN)
    • Flutter version 3.3.9 on channel stable at /Users/tungakanui/fvm/versions/3.3.9
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision b8f7f1f986 (4 weeks ago), 2022-11-23 06:43:51 +0900
    • Engine revision 8f2221fbef
    • Dart version 2.18.5
    • DevTools version 2.15.0

[!] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
    • Android SDK at /Users/tungakanui/Library/Android/sdk
    • Platform android-33, build-tools 33.0.0
    • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840)
    ! Some Android licenses not accepted.  To resolve this, run: flutter doctor --android-licenses

[✓] Xcode - develop for iOS and macOS (Xcode 14.2)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 14C18
    • CocoaPods version 1.11.3

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2021.2)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840)

[✓] IntelliJ IDEA Ultimate Edition (version 2022.2.3)
    • IntelliJ at /Applications/IntelliJ IDEA.app
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart

[✓] VS Code (version 1.74.0)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.54.0

[✓] Connected device (2 available)
    • macOS (desktop) • macos  • darwin-arm64   • macOS 13.0.1 22A400 darwin-arm
    • Chrome (web)    • chrome • web-javascript • Google Chrome 108.0.5359.124

[✓] HTTP Host Availability
    • All required HTTP hosts are available

! Doctor found issues in 1 category.
```

![image](https://user-images.githubusercontent.com/54916679/208807291-4e33fe7d-2adc-47e9-8354-86a1d203fc96.png)
![image](https://user-images.githubusercontent.com/54916679/208807299-6e6622ef-592d-476f-90bd-0c7252b5396d.png)
Repository: godot
Issue: Adding a `PopupMenu` as a child of another `PopupMenu` might cause graphical artifacts under X11
Labels: bug,topic:rendering,topic:gui

### Godot version

v4.0.beta9.official [e780dc332]

### System information

KDE neon 22.04 (Ubuntu-derived)

### Issue description

Adding a `PopupMenu` node, either dynamically, or previously saved as a standalone scene, as a child node of another `PopupMenu` causes graphical artifacts to appear on X11 under certain conditions, in a project with "Embed Subwindows" option turned off.

![Screenshot_20221220_163011](https://user-images.githubusercontent.com/61425/208800598-fcb1511e-48fb-4e4c-ae7c-df8cd991e09e.png)

I have found this issue when experimenting with sub-menus.

Even if adding the child node after some delay (with e.g. `await get_tree().create_timer(...).timeout`), the issue still occurs.

The artifact has the same size of the `PopupMenu` control, and goes away after interacting with the Godot app or another window.

Only way I've found to workaround this issue is turning the `PopupMenu` node visibility off (i.e. clicking the eye of the node in the scene dock), which is the default for nodes created by `new`. However, when doing that through the editor on another scene I'm using as a prefab, it gets reverted whenever I switch back to the scene containing the `PopupMenu`, so I have to double-check its visibility is off before testing. This was how I found the issue the first time.

Also, when re-enabling the "Embed Subwindows" on the test project, I get this error reported on the Debug dock:

```
E 0:00:00:0308   window_get_popup_safe_rect: Condition "!windows.has(p_window)" is true. Returning: Rect2i()
  <C++ Source>   platform/linuxbsd/x11/display_server_x11.cpp:3418 @ window_get_popup_safe_rect()
```

This issue only happens when a Vulkan-enable renderer is selected.

### Steps to reproduce

1. Start a new empty project, selecting "Mobile' or "Forward+" renderer;
2. Uncheck the "Subwindows → Embed Subwindows" option, under "Window" on Project Settings;
3. Create a scene with only a `PopupMenu` as the scene root;
4. Create another scene, containing a `MenuButton`;
5. Attach a script to the menu button scene, containing a `_ready` method;
6. On the `_ready` method body, preload the sub-menu scene, instance it and add it as a child node of the `MenuButton`'s `PopupMenu` (with `get_popup().add_child(...)`).

### Minimal reproduction project

The MRP contains two samples:
* One using a `PopupMenu` prefab;
* Another one creating `PopupMenu`'s on the fly.

[MRP.zip](https://github.com/godotengine/godot/files/10274285/MRP.zip)
Repository: electron
Issue: [Feature Request]: Analog XMLHttpRequest.upload.onprogress
Labels: enhancement :sparkles:,component/net

### Preflight Checklist

- [X] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/main/CONTRIBUTING.md) for this project.
- [X] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/main/CODE_OF_CONDUCT.md) that this project adheres to.
- [X] I have searched the [issue tracker](https://www.github.com/electron/electron/issues) for a feature request that matches the one I want to file, without success.

### Problem Description

In class `ClientRequest `is contains method `getUploadProgress() ` for get progress upload. I not how to get dynamic call analog  `XMLHttpRequest.upload.onprogress` in module `net`.  A search in the documentation and internet did not give an answer.
 

### Proposed Solution

```
 const request = net.request({
                method: 'POST'
                // other options  ... 
            }); 
request.on('upload', (uploadProgress) => {})
```

### Alternatives Considered

XMLHttpRequest.upload.onprogress
axio.onUploadProgress

### Additional Information

_No response_
Repository: pytorch
Issue: JIT mishandles torch.round() in PyTorch 1.10.1
Labels: oncall: jit

### 🐛 Describe the bug

Behavior of `round()` is different when used in a function annotated with `@torch.jit.script`. Per documentation, `round()` should break ties to even; this is the behavior observed in a regular Python function. The JIT sometimes emits code that breaks ties by rounding up, as in the following example:

```python
import torch
import time

@torch.jit.script
def round_jit(x: torch.Tensor, inv_scale: float):
        x_scaled = x / inv_scale
        return x_scaled.round()

def round_baseline(x: torch.Tensor, inv_scale: float):
        x_scaled = x / inv_scale
        return x_scaled.round()

print(f'Torch version: {torch.__version__}')
inv_scale = 1
x0 = torch.zeros([4, 128, 16, 16], dtype=torch.float32)
x0 = x0 * 0 + 0.5
for n in range(2,3):
  for c in range(2,65):
    for h in range(2,9):
      for w in range(2,9):
        x = x0[1:n, 1:c, 1:h, 1:w]
        rbl = round_baseline(x, inv_scale)
        rji = round_jit(x, inv_scale)
time.sleep(1) # Give time for the JIT to compile...
x = x0[0:1, 0:1, 0:1, 0:1]
rbl = round_baseline(x, inv_scale)
rji = round_jit(x, inv_scale)
print(f'Input: {x}')
print(f'Output (baseline): {rbl}')
print(f'Output (JIT): {rji}')
assert rbl.equal(rji)
```

```
Torch version: 1.10.1+cu113
Input: tensor([[[[0.5000]]]])
Output (baseline): tensor([[[[0.]]]])
Output (JIT): tensor([[[[1.]]]])
Traceback (most recent call last):
  File "test-jit.py", line 31, in <module>
    assert rbl.equal(rji)
AssertionError
```

Disclaimer: This bug was discovered as part of work I performed as an IBM employee.

### Versions

PyTorch version: 1.10.1+cu113
Is debug build: False
CUDA used to build PyTorch: 11.3
ROCM used to build PyTorch: N/A

OS: Red Hat Enterprise Linux release 8.6 (Ootpa) (x86_64)
GCC version: (GCC) 8.5.0 20210514 (Red Hat 8.5.0-10)
Clang version: 9.0.1 (Red Hat 9.0.1-2.module+el8.2.0+5494+7b8075cf)
CMake version: version 3.20.2
Libc version: glibc-2.3.4

Python version: 3.6.8 (default, Jan 14 2022, 11:04:20)  [GCC 8.5.0 20210514 (Red Hat 8.5.0-7)] (64-bit runtime)
Python platform: Linux-4.18.0-372.26.1.el8_6.x86_64-x86_64-with-redhat-8.6-Ootpa
Is CUDA available: False
CUDA runtime version: No CUDA
CUDA_MODULE_LOADING set to: N/A
GPU models and configuration: No CUDA
Nvidia driver version: No CUDA
cuDNN version: No CUDA
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: True

Versions of relevant libraries:
[pip3] numpy==1.19.5
[pip3] torch==1.10.1+cu113
[pip3] torchaudio==0.10.1+cu113
[pip3] torchvision==0.11.2+cu113
[conda] Could not collect

cc @EikanWang @jgong5 @wenzhe-nrv @sanchitintel