sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: flutter
Issue: UI builds may take more than 20ms
Labels: framework,c: performance,perf: speed,has reproducible steps,P2,found in release: 2.2,found in release: 2.6,team-framework,triaged-framework

The flutter appbar widget actually takes 3 ms to build and the bottomNavigationBar takes 8 ms to build, what's going on !

This is my code(Flutter (Channel stable, 2.2.3, on Microsoft Windows [Version 10.0.19042.1165--MI6 mobile)：

<details>
<summary> code sample</summary>

1 appBar
```dart
return Scaffold(
      backgroundColor: Color(0xffefeff4),
      appBar: AppBar(
        brightness: Brightness.dark,
        centerTitle: true,
        title: Text("category"),
        elevation: 0.0,
      ),
```

2、bottomNAvigationBar

```dart
bottomNavigationBar: BottomNavigationBar(
        onTap: (index) {
          print(index);
          Navigator.push(context,
              MaterialPageRoute(builder: (context) => bottomPage[index]));
        },
        currentIndex: _cindex,
        showUnselectedLabels: true,
        showSelectedLabels: true,
        unselectedItemColor: Color(0xff4a5a6a),
        selectedItemColor: Colors.green,
        unselectedLabelStyle: TextStyle(
          color: Colors.blue,
        ),
        // backgroundColor: Colors.green,
        items: const <BottomNavigationBarItem>[
          BottomNavigationBarItem(
            icon: Icon(Icons.list_alt),
            label: 'a',
          ),
          BottomNavigationBarItem(
            icon: Icon(Icons.chrome_reader_mode),
            label: 'b',
          ),
          BottomNavigationBarItem(
            icon: Icon(Icons.fact_check),
            label: 'c',
          ),
          BottomNavigationBarItem(
            icon: Icon(Icons.reorder),
            label: 'd',
          ),
          BottomNavigationBarItem(
            icon: Icon(Icons.settings),
            label: 'e',
          ),
        ],
      ),
```

</details>

![1](https://user-images.githubusercontent.com/65022120/130321992-62a47ed3-d70e-433c-b8f2-45350e869d48.jpeg)


ui threads only 16ms build? Sure it can be done? This is a very simple widget!
Repository: go
Issue: cmd/compile: can not compile large function
Labels: NeedsInvestigation,compiler/runtime

<!--
Please answer these questions before submitting your issue. Thanks!
For questions please use one of our forums: https://github.com/golang/go/wiki/Questions
-->

### What version of Go are you using (`go version`)?

<pre>
$ go version
go version devel go1.18-e9e0d1ef70 Fri Aug 20 03:25:36 2021 +0000 windows/amd64
</pre>

### Does this issue reproduce with the latest release?

Yes.

### What operating system and processor architecture are you using (`go env`)?

<details><summary><code>go env</code> Output</summary><br><pre>
$ go env
set GO111MODULE=on
set GOARCH=amd64
set GOBIN=
set GOCACHE=C:\Users\mattn\AppData\Local\go-build
set GOENV=C:\Users\mattn\AppData\Roaming\go\env
set GOEXE=.exe
set GOEXPERIMENT=
set GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOINSECURE=
set GOMODCACHE=C:\Users\mattn\go\pkg\mod
set GONOPROXY=
set GONOSUMDB=
set GOOS=windows
set GOPATH=C:\Users\mattn\go
set GOPRIVATE=
set GOPROXY=https://proxy.golang.org,direct
set GOROOT=C:\dev\go
set GOSUMDB=sum.golang.org
set GOTMPDIR=
set GOTOOLDIR=C:\dev\go\pkg\tool\windows_amd64
set GOVCS=
set GOVERSION=devel go1.18-e9e0d1ef70 Fri Aug 20 03:25:36 2021 +0000
set GCCGO=gccgo
set AR=ar
set CC=gcc
set CXX=g++
set CGO_ENABLED=1
set GOMOD=C:\Users\mattn\go\src\github.com\mattn\go-iseven\go.mod
set CGO_CFLAGS=-g -O2
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-g -O2
set CGO_FFLAGS=-g -O2
set CGO_LDFLAGS=-g -O2
set PKG_CONFIG=pkg-config
set GOGCCFLAGS=-m64 -mthreads -fmessage-length=0 -fdebug-prefix-map=C:\Users\mattn\AppData\Local\Temp\go-build1034691121=/tmp/go-build -gno-record-gcc-switches
</pre></details>

### What did you do?

<!--
If possible, provide a recipe for reproducing the error.
A complete runnable program is good.
A link on play.golang.org is best.
-->

```
$ git clone https://github.com/mattn/go-iseven
$ cd go-iseven
$ go build
```

### What did you expect to see?

Compilation successfully.

### What did you see instead?

Compilation take too long times. I couldn't build this for few minutes. I'm using Windows 10. 16GB RAM.

This is a joke project that provide same function with https://github.com/samuelmarina/is-even. The code is generated from js code. The compilation require too many CPU usage and memory.
Repository: pytorch
Issue: a problem happened in torch.randperm
Labels: needs reproduction,triaged,module: random

## 🐛 Bug

<!-- A clear and concise description of what the bug is. -->
cuda: 11.2
python: 3.7
pytorch: 1.8.1

when i use the function  _**torch.randperm**_ in my deep leanring program, the result of torch.randperm function overflows, like this:  
```
torch.randperm(101796), the part of the result maybe: 
[ 4813016382542575416,  4905078031578209548,  4836849538327659392,4899581723280245818, 4811288396943887254,  4845084949136751058,4840258436545028096,  4849273306714498311,  4868167456287396240,4902030524648793022,  4884139103933824296,  4888640401459772558,
4893216989750764228,,,,]
```

but noticed, this function can work well when the version of pytorch is 1.5.0

the code is from detectron2, about mask r-cnn:
`_sample.py_
Copyright (c) Facebook, Inc. and its affiliates.
import torch

from detectron2.layers import nonzero_tuple

def subsample_labels(
    labels: torch.Tensor, num_samples: int, positive_fraction: float, bg_label: int
):
  
    positive = nonzero_tuple((labels != -1) & (labels != bg_label))[0]
    negative = nonzero_tuple(labels == bg_label)[0]

    num_pos = int(num_samples * positive_fraction)
    # protect against not enough positive examples
    num_pos = min(positive.numel(), num_pos)
    num_neg = num_samples - num_pos
    # protect against not enough negative examples
    num_neg = min(negative.numel(), num_neg)

    # randomly select positive and negative examples
    perm1 = torch.randperm(positive.numel(), device=positive.device)[:num_pos]
    perm2 = torch.randperm(negative.numel(), device=negative.device)[:num_neg]

    pos_idx = positive[perm1]
    neg_idx = negative[perm2]
    return pos_idx, neg_idx`


- when we change the code: `
perm1 = torch.randperm(positive.numel(), device=positive.device)[:num_pos]
perm2 = torch.randperm(negative.numel(), device=negative.device)[:num_neg]
` as `
perm1 = torch.randperm(positive.numel())[:num_pos]
perm1 = perm1.to(positive.device)
perm2 = torch.randperm(negative.numel())[:num_neg]
perm2 = perm2.to(negative.device)
`
- the overflow is disappear

cc @pbelevich @heitorschueroff
Repository: material-ui
Issue: [material-ui][Dialog][Tooltip] Improve performance with lots of elements
Labels: performance,component: tooltip,component: modal

<!-- Provide a general summary of the feature in the Title above -->

<!--
  Thank you very much for contributing to Material-UI by creating an issue! ❤️
  To avoid duplicate issues we ask you to check off the following list.
-->

<!-- Checked checkbox should look like this: [x] -->

- [x] I have searched the [issues](https://github.com/mui-org/material-ui/issues) of this repository and believe that this is not a duplicate.

## Summary 💡

Adding / removing children to / from the HTML `body` causes the browser to recalculate the children of the `body`. With many elements this can have a noticeable performance impact.

Temporary elements should be created in a permanent child of `body`.


## Examples 🌈

<!--
  Provide a link to the Material Design guidelines, other implementations,
  or screenshots of the expected behavior.
-->

This is a contrived example where we're rendering 10000 button elements in the `body`.
You can clearly see the performance impact on opening the modal dialog.

[**Bad**](https://codesandbox.io/s/simpledialog-material-demo-forked-ynn2e?file=/demo.js):
Just use the dialog normally, it will be rendered as direct child of the `body`.
Opening the modal dialog takes >600ms.
![image](https://user-images.githubusercontent.com/10603631/130324159-42bdb75e-1bd3-4ab8-b707-4207d887a301.png)

[**Good**](https://codesandbox.io/s/simpledialog-material-demo-forked-ho5q5?file=/demo.js):
A custom div in the body that is used as `container` of the dialog.

Opening the modal dialog takes ~65ms.
![image](https://user-images.githubusercontent.com/10603631/130324174-7ffaf6bc-14d3-4771-807c-a1522926e117.png)

This problem also affects other elements based on the `Dialog` component, e.g. [the `Drawer`](https://codesandbox.io/s/temporarydrawer-material-demo-forked-ihpfb?file=/demo.js).

This problem *could* also affect the `Tooltip` component, though after a quick test I wasn't able to see any notable performance improvements (see [this demo](https://codesandbox.io/s/r6je2?file=/demo.js)).


Note: it seems like chrome (firefox not so much) can handle this if the 10000 buttons are nested (see [this demo where the buttons are wrapped in a div](https://codesandbox.io/s/simpledialog-material-demo-forked-kylty?file=/public/index.html)).

## Motivation 🔦

<!--
  What are you trying to accomplish? How has the lack of this feature affected you?
  Providing context helps us come up with a solution that is most useful in the real world.
-->

I just read [this blog post](https://atfzl.com/don-t-attach-tooltips-to-document-body) by @atfzl (thx btw!) about performance pitfalls for children of `body`. I was wondering if this could affect the material-ui components as well.
Repository: vscode
Issue: Automatically hide terminal panel when a file in the explorer is clicked
Labels: feature-request,layout

<!-- ⚠️⚠️ Do Not Delete This! feature_request_template ⚠️⚠️ -->
<!-- Please read our Rules of Conduct: https://opensource.microsoft.com/codeofconduct/ -->
<!-- Please search existing issues to avoid creating duplicates. -->

<!-- Describe the feature you'd like. -->

At the moment I'm using my panels maximized always with `"workbench.panel.opensMaximized": "always",` in my settings because I'd like to use my Terminal at full height all the time.

I'm using the following keyboard shortcut to toggle the terminal window:

```
    {
        "key": "cmd+e",
        "command": "workbench.action.terminal.toggleTerminal"
    },
```

The problem now exists that if I click a file in the explorer, the terminal doesn't go away but actually resizes only a bit or half-screen (depends from time to time). See the behavior in the video below:

https://user-images.githubusercontent.com/594614/130325753-78d4e905-7b03-44bb-887a-5ed6fd66938e.mov

Ideally I wish that the terminal would close when I click on a file in the explorer since the action to open up a file should bring that file up full screen. 

To summarize: I never want to use my terminal half-screen.
Repository: storybook
Issue: Property descriptions missing from Docs Page on Svelte + TypeScript
Labels: bug,svelte,addon: docs,block: argstable

**Describe the bug**
When a Svelte component is using plain JavaScript, its property descriptions are extracted from JSDoc blocks inside the component. However, if you switch `<script>` with `<script lang="ts">` (and optionally adding some types in there), it stops picking up anything at all.

**To Reproduce**
https://github.com/notpushkin/repro-storybook-svelte-typescript
```
git clone https://github.com/notpushkin/repro-storybook-svelte-typescript.git
cd repro-storybook-svelte-typescript
yarn
yarn storybook
```

**System**
```
Environment Info:

  System:
    OS: Linux 5.4 Ubuntu 20.04.2 LTS (Focal Fossa)
    CPU: (4) x64 Intel(R) Core(TM) i5-2520M CPU @ 2.50GHz
  Binaries:
    Node: 14.17.5 - /usr/bin/node
    Yarn: 1.22.5 - /usr/bin/yarn
    npm: 6.14.14 - /usr/bin/npm
  Browsers:
    Firefox: 91.0
  npmPackages:
    @storybook/addon-actions: ^6.4.0-alpha.30 => 6.4.0-alpha.30 
    @storybook/addon-essentials: ^6.4.0-alpha.30 => 6.4.0-alpha.30 
    @storybook/addon-links: ^6.4.0-alpha.30 => 6.4.0-alpha.30 
    @storybook/addon-svelte-csf: ^1.1.0 => 1.1.0 
    @storybook/svelte: ^6.4.0-alpha.30 => 6.4.0-alpha.30 
```

**Additional context**
Possibly related? #14876
Repository: youtube-dl
Issue: Add support to radiko.jp
Labels: site-support-request

<!--

######################################################################
  WARNING!
  IGNORING THE FOLLOWING TEMPLATE WILL RESULT IN ISSUE CLOSED AS INCOMPLETE
######################################################################

-->


## Checklist

<!--
Carefully read and work through this check list in order to prevent the most common mistakes and misuse of youtube-dl:
- First of, make sure you are using the latest version of youtube-dl. Run `youtube-dl --version` and ensure your version is 2021.06.06. If it's not, see https://yt-dl.org/update on how to update. Issues with outdated version will be REJECTED.
- Make sure that all provided video/audio/playlist URLs (if any) are alive and playable in a browser.
- Make sure that site you are requesting is not dedicated to copyright infringement, see https://yt-dl.org/copyright-infringement. youtube-dl does not support such sites. In order for site support request to be accepted all provided example URLs should not violate any copyrights.
- Search the bugtracker for similar site support requests: http://yt-dl.org/search-issues. DO NOT post duplicates.
- Finally, put x into all relevant boxes (like this [x])
-->

- [x] I'm reporting a new site support request
- [x] I've verified that I'm running youtube-dl version **2021.06.06**
- [x] I've checked that all provided URLs are alive and playable in a browser
- [x] I've checked that none of provided URLs violate any copyrights
- [x] I've searched the bugtracker for similar site support requests including closed ones


## Example URLs

<!--
Provide all kinds of example URLs support for which should be included. Replace following example URLs by yours.
-->

Any of https://radiko.jp/#!/timeshift. If you are outside the area, you need to register as a premium member.

- Single video: https://radiko.jp/#!/ts/LFR/20210821130000


## Description

Need `X-Radiko-AuthToken` to download.
Repository: godot
Issue: Mipmap creation is not threaded (for ImageTexture::create_from_image())
Labels: discussion,topic:core

### Godot version

3.3.3 stable.mono  (and 3.1.1 stable -> 3.4beta4)

### System information

Windows 10, GLES3

### Issue description

not sure on title

The mipmap creation in ImageTexture::create_from_image() (flags=1 or 7) runs on the main thread, even if the create_from_image() call itself is in a thread. This results in the application freezing for large resolution images (or presumably for weaker computers). 

I am not certain if this is an issue, but I think it should be documented at least.

### Steps to reproduce
a.jpg is a 12000x12000 image
```gdscript
	var p:String = "res://a.jpg"
	var t:Thread
	func test() -> void:
		t = Thread.new()
		t.start(self, "_test", 0)
	
	func _test(_u:int) -> void:
		var i:Image = Image.new()
		var it1:ImageTexture = ImageTexture.new()
		var it2:ImageTexture = ImageTexture.new()
		
		var e:int = i.load(p)
		if e == OK: 
			it1.create_from_image(i, 1) # causes lag 
			it2.create_from_image(i, 0) # does not cause lag (much less at least)
		t.call_deferred("wait_to_finish")
```

### Minimal reproduction project

[mipmap lag.zip](https://github.com/godotengine/godot/files/7026315/mipmap.lag.zip)
Repository: vscode
Issue: [Bugs] Issues in new json settings editor
Labels: feature-request,settings-editor

## Environment
<!-- ⚠️⚠️ Do Not Delete This! bug_report_template ⚠️⚠️ -->
<!-- Please read our Rules of Conduct: https://opensource.microsoft.com/codeofconduct/ -->
<!-- 🕮 Read our guide about submitting issues: https://github.com/microsoft/vscode/wiki/Submitting-Bugs-and-Suggestions -->
<!-- 🔎 Search existing issues to avoid creating duplicates. -->
<!-- 🧪 Test using the latest Insiders build to see if your issue has already been fixed: https://code.visualstudio.com/insiders/ -->
<!-- 💡 Instead of creating your report here, use 'Report Issue' from the 'Help' menu in VS Code to pre-fill useful information. -->
<!-- 🔧 Launch with `code --disable-extensions` to check. -->
Does this issue occur when all extensions are disabled?: Yes

<!-- 🪓 If you answered No above, use 'Help: Start Extension Bisect' from Command Palette to try to identify the cause. -->
<!-- 📣 Issues caused by an extension need to be reported directly to the extension publisher. The 'Help > Report Issue' dialog can assist with this. -->
- VS Code Version: 1.59.1
- OS Version: ubuntu 20.04

## Bug 1: nodes do not maintain collapsed/expanded state
1. open json settings
2. collapse or expand some nodes
3. go to other tab
4. go back to json tab - all nodes are expanded

It is inconvenient spending time finding a setting, switching away to refer to something, then switch back and losing your place because all the nodes are once again expanded.

## Bug 2: nodes are not sorted
1. open json settings
2. nodes are shown in random order

It is inconvenient having nodes in random order - it's already hard to find settings. So for example, the `"files"` node should come before the `"window"` node.

## Bug 3: first node is now redundant
1. open json settings
2. the first node is the remnant of the old json settings editor's "most recent" feature

The first node has no value anymore, and since it's not labelled as such, it gets confusing because there are double nodes for everything in that list, which show up in searches.

## Justification for fixing these bugs
Those bugs have been around for a long time, but we managed. However now that the json settings editor was removed ([[1]](https://github.com/microsoft/vscode/issues/125952), [[2]](https://github.com/microsoft/vscode/issues/130457)), please at least meet us halfway and address them.

Without the advanced features of the old json settings editor, these bugs make the experience time consuming and frustrating.
Repository: rust
Issue: [ER] Introduce an unused mut warning when get_mut() should be replaced by get()
Labels: A-lints,C-feature-request

Here I'd like the rustc compiler to warn me that a `get()` suffices (this is equivalent to an 'unused mut warning'):

```rust
fn finder(data: &mut [u32]) {
    let mut i = 0;
    while let Some(di) = data.get_mut(i) {
        println!("{}", di);
        i += 1;
    }
}
```

(Once the programmer has replaced the `get_mut` with a `get`, I'd like the rustc to also warn me that `data` doesn't need to be mutable in the function signature).
Repository: terminal
Issue: Sandboxed XAML for less resource-hungry background animation
Labels: Issue-Feature,Area-Extensibility,Product-Terminal

<!-- 
🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨

I ACKNOWLEDGE THE FOLLOWING BEFORE PROCEEDING:
1. If I delete this entire template and go my own path, the core team may close my issue without further explanation or engagement.
2. If I list multiple bugs/concerns in this one issue, the core team may close my issue without further explanation or engagement.
3. If I write an issue that has many duplicates, the core team may close my issue without further explanation or engagement (and without necessarily spending time to find the exact duplicate ID number).
4. If I leave the title incomplete when filing the issue, the core team may close my issue without further explanation or engagement.
5. If I file something completely blank in the body, the core team may close my issue without further explanation or engagement.

All good? Then proceed!
-->

# Description of the new feature/enhancement

<!-- 
A clear and concise description of what the problem is that the new feature would solve.
Describe why and how a user would use this new functionality (if applicable).
-->

There are currently two ways to configure background animation in Windows Terminal:

1. Video files
2. Pixel shaders

Video files will either take up a lot of disk space (when encoded at high resolution) or be prone to scaling artifacts (when encoded at low resolution). Pixel shaders are inefficient by nature and consume significantly more GPU resource than what is necessary.

Background animation implemented in XAML could possibly solve all of these problems, making it more practical for budget laptops to render animated background. Due to obvious security concerns, these XAML files must be sandboxed.

# Proposed technical implementation details (optional)

<!-- 
A clear and concise description of what you want to happen.
-->

The application shall accept XAML files (.xaml) in addition to all the currently supported image/video formats as a background image for each profile.

When a XAML file is specified in the profile configuration, the app loads the XAML in a sandbox and renders the content in the background.

## Why XAML? Why not any other vector animation format?

Because I think that introducing another dependency just for the sake of decoration would not be acceptable. XAML animation could be implemented without any external libraries.

## Why not let an external assembly draw whatever it wants into the surface?

Because at that point it's turning into a full-blown plugin architecture, which has been officially announced to not arrive until much later.
Repository: flutter
Issue: Callback for Dismissible once the threshold is reached/not reached
Labels: c: new feature,framework,c: proposal,P3,team-framework,triaged-framework

## Use case

When sliding a dismissible widget, the widget in the background becomes visible. Currently, there doesn't seem to be a way to change this background widget based on whether the dismissThresholds are reached. If this was possible, you could e.g. show the background widget in a grey color and once the dismiss would actually happen when the user lets go, the widget could change to e.g. red, indicating that the dismiss will now actually be triggered.

## Proposal

Add a callback once the dismissThreshold (or the default) is reached or rather changed, maybe passing some boolean showing if the drag is currently inside or outside the thresholds.
Repository: vscode
Issue: [FR] Filter commands by source improvements
Labels: feature-request,ux,keybindings-editor

<!-- ⚠️⚠️ Do Not Delete This! feature_request_template ⚠️⚠️ -->
<!-- Please read our Rules of Conduct: https://opensource.microsoft.com/codeofconduct/ -->
<!-- Please search existing issues to avoid creating duplicates. -->

<!-- Describe the feature you'd like. -->

When looking for commands, it'll be great to be able to filter them by source in the table header, currently, the filter options are hidden in the top right corner, which is hard to find.

Also, typing `@source` currently won't trigger suggestions, it'd be great if it supports that.

![image](https://user-images.githubusercontent.com/28700378/130372601-575bd140-78fe-4a59-a45f-25499ba241c3.png)